Skip to content

Commit 9649560

Browse files
mgeisertgithub-cygwin
authored andcommitted
Cygwin: Quash Windows error text to user on fork() error
For a very long time, since 2011 or earlier, fork() has printed an internal error message when it fails due to a CreateProcess() error. This patch quashes the error message as far as the user can tell, but it will still be present in an strace. This change is a judgement call based on the fact we now support RLIMIT_NPROC and so a user limiting the number of subprocesses may hit more CreateProcess() errors by design. Don't clutter the scene. Fixes: 8551087 (* dll_init.c (dll_list::load_after_fork): Don't clear in_forkee here.) Signed-off-by: Mark Geisert <mark@maxrnd.com>
1 parent f077ba2 commit 9649560

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

winsup/cygwin/fork.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ frok::parent (volatile char * volatile stack_here)
400400
{
401401
this_errno = geterrno_from_win_error ();
402402
error ("CreateProcessW failed for '%W'", myself->progname);
403+
ch.silentfail (true);
403404
dlls.release_forkables ();
404405
memset (&pi, 0, sizeof (pi));
405406
goto cleanup;

0 commit comments

Comments
 (0)