Issue with kill after exec in testsuite

Jon Turney jon.turney@dronecode.org.uk
Fri Jul 11 10:32:22 GMT 2025


On 08/07/2025 20:02, Jeremy Drake via Cygwin-developers wrote:
> I've run into an odd issue with exec and kill in winsup/testsuite that
> doesn't happen in a more normal configuration.  What I'm doing is getting

This is odd.

Jst so I'm clear: This works when run normally, but but fails when run 
in the testsuite?

> the pid via getpid (), then forking.  In the forked child, I can call kill
> (pid, SIGUSR1) without issue, but if instead I call execv (passing the
> pid as an argument) and then call kill after the exec I get "No such
> process" error.  Can anyone tell what I'm doing wrong?
> 
> Here's the test output:
> kill after exec: No such process
> SUCCESS: The process with PID 3748 (child process of PID 5984) has been terminated.
> Timeout
> FAIL winsup.api/killissue.exe (exit status: 124)
> 
> And here's a test with the working fork/kill if 0'ed out and the broken
> fork/exec/kill in place:
> [...]

Weird.

The only think I can think of right now is if somehow the 
execv("/proc/self/exe") is escaping the testinst, and running against 
the (different) installed cygwin DLL instead?

But that doesn't seem very plausible.



More information about the Cygwin-developers mailing list