This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Bash returns incorrect process status

Pierre A. Humblet wrote:
> FWIW, attached is a patch to bash that may improve its 
> behavior on Cygwin.
> The idea is that when a new process is stored in the memory array, any
> existing process with the same pid is marked "reused". 
> "reused" processes
> are never considered when searching for a process by pid. 
> They are still
> still available, e.g. to get the status of processes in a job. 
> It's a proof of principle code, not meant to be efficient. It 
> can still print
> a debug message on stderr.

Tried it and it doesn't solve the problem for me. It shifts the trigger
pattern though.

Without the patch, an almost sure thing to do to trigger the bug is to
run the configure script under "strace bash". But with the patch, I have
not been able to trigger the bug once.

However, just running the configure script without straceing bash
triggers the bug at about the same rate as without the patch (I estimate
that between 1/3 and 1/2 of the runs fail).

But wait, now I tried to trigger the bug with the original bash and that
also fails when straceing. So I guess my remark about the shift in
trigger pattern is not certain...

/me makes a note of the phase of the moon

I have not noted any occurance of the "Found old pid..." message. Is
that an indication that the patch never kicks in?


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]