diff options
author | dholland <dholland> | 2012-10-10 19:19:58 +0000 |
---|---|---|
committer | dholland <dholland> | 2012-10-10 19:19:58 +0000 |
commit | f89550136815fa5ca5aca8490aad713e0769fb48 (patch) | |
tree | 727dc4a3d779c4483a10972c7cb3a97d957b6888 /shells/tcsh | |
parent | d94a5a8f6826902b602c4a4047f37358d9c0ef00 (diff) | |
download | pkgsrc-f89550136815fa5ca5aca8490aad713e0769fb48.tar.gz |
oops, actually add the patch.
Diffstat (limited to 'shells/tcsh')
-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. |