[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ic] interchange.pid


On 11/17/2007 07:23 AM, Mike Heins wrote:
> Quoting Brian Pribis (suppressed):
>> Mike,
>>
>>> "Looking in the file"? I don't know what you can do about it if you
>>> do look, as you can't know whether that PID is running.
>>>
>>
>> In Perl I could do a
>>
>> open(PS_F, "ps -o pid,user,comm -u interch_user|");
>>
>> loop over PS_F and
>>
>>
>> ($pid, $user, $comm) = split;
>>
>>
>> At least, that works on linux, I still have to see if it works on Sun.
>>
>>
>>> Of course if you glue stuff together with shell commands, you can,
> 
> As you have shown above. Add to this the fact that ps(1) is about the
> most notoriously unportable shell command there is....
> 
>>> but if you were going to do that then you just write a shell script
>>> to perform the startup / shutdown.
>>>
>> Bingo!   Which sucks in a way as I would much rather find out why this 
>> is happening (although finding work arounds is enjoyable too).
> 
> We know why it is happening. But no one in the Perl community has come
> up with a fix in 10 years.
> 
> It is actually a System V thing, as you will find Irix has the same
> troubles. BSD seems to work fine.

If there's a better workaround or fix than the one shown above, then I'm
all for it, but I would venture to say that it would be worth it to
implement the above workaround just for Sun and other SYS V systems that
have the same issues.  We could flag it with an environment variable so
it only gets done on those systems that really need it (I would say a
configuration variable, but I don't think we've even read any config at
that point).  Let's just make sure that the ps command we use is as
portable as we can make it.

Peter

_______________________________________________
interchange-users mailing list
suppressed
http://www.icdevgroup.org/mailman/listinfo/interchange-users


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.