[ic] interchange.pid

Davor Ocelic docelic at spinlocksolutions.com
Fri Nov 16 11:49:22 EST 2007


> O.k. I had to use truss and what I got was interesting.  I had to 
> actually run it own interchange --start just so I could see what was normal.
> 
> When I run truss on the pid of an already running IC and then tried 
> ./interchange --stop, not much happened.  One thing I did notice, 
> however, was that I was seeing calls to "open64("[path to 
> interchange]/etc", O_RDONLY|O_NDELAY) = 2

This is the normal open() function on a directory, and since the right-hand
side is positive value (2), it means the call succeeded.

After that, there should be a call to stat() or open() the actual
pid file. (Search for .pid or something)

> I am thinking there should be a filename in there somewhere.   If this 
> is the call to read the pid file, then I can see why it is failing.  The 
> question is, where does this call get its value for the pid file from?   
> It must be missing from a configuration somewhere, but I'll be darned if 
> I can figure out where.

It's either from PIDfile setting, or from the default value. You
can open file Vend/Config.pm in Interchange source and search for 
'PIDfile' - there you will see how it's defined and what the default
value is.

The reason why you don't see anything about the PIDfile value in
truss output is that truss only traces system calls (not library calls),
so you don't get to see what's happening in the period while the program
isn't doing any system calls. (There should be truss-similar command
that can also trace library calls, but it's not needed in your case).

> Also, I am able to delete the file while IC is running.  I half 
> suspected that it would be locked while the server is  up.   Is this wrong?

Locking is a 'soft' mechanism. It works only as long as the application
"honors" it. The shell 'rm' command of course doesn't and it deletes
anything you tell it to (provided you have permissions to delete it).


So, search more for .pid in the truss output, and also look into Mike's 
suggestion.

Cya,
-doc



More information about the interchange-users mailing list