diff options
author | dholland <dholland@pkgsrc.org> | 2012-10-10 19:19:58 +0000 |
---|---|---|
committer | dholland <dholland@pkgsrc.org> | 2012-10-10 19:19:58 +0000 |
commit | a34e1024f9ff8b334ac4e4d20f54c13b0edd0a1a (patch) | |
tree | 727dc4a3d779c4483a10972c7cb3a97d957b6888 /shells | |
parent | 1fc7586a6799a659600dc84dbdcfc7876f41ee85 (diff) | |
download | pkgsrc-a34e1024f9ff8b334ac4e4d20f54c13b0edd0a1a.tar.gz |
oops, actually add the patch.
Diffstat (limited to 'shells')
-rw-r--r-- | shells/tcsh/patches/patch-sh.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/shells/tcsh/patches/patch-sh.c b/shells/tcsh/patches/patch-sh.c new file mode 100644 index 00000000000..13ab25bc35b --- /dev/null +++ b/shells/tcsh/patches/patch-sh.c @@ -0,0 +1,24 @@ +$NetBSD: patch-sh.c,v 1.1 2012/10/10 19:19:58 dholland Exp $ + +Avoid calling tcsetpgrp on fd -1; prevents libc diagnostic assertion +in NetBSD. From christos. + +--- sh.c~ 2011-11-29 18:38:54.000000000 +0000 ++++ sh.c +@@ -1215,14 +1215,14 @@ main(int argc, char **argv) + + #ifdef NeXT + /* NeXT 2.0 /usr/etc/rlogind, does not set our process group! */ +- if (shpgrp == 0) { ++ if (f != -1 && shpgrp == 0) { + shpgrp = getpid(); + (void) setpgid(0, shpgrp); + (void) tcsetpgrp(f, shpgrp); + } + #endif /* NeXT */ + #ifdef BSDJOBS /* if we have tty job control */ +- if (grabpgrp(f, shpgrp) != -1) { ++ if (f != -1 && grabpgrp(f, shpgrp) != -1) { + /* + * Thanks to Matt Day for the POSIX references, and to + * Paul Close for the SGI clarification. |