* PATCH: zpty.c - slave used before set warning
@ 2000-06-27 14:18 Andrej Borsenkow
0 siblings, 0 replies; only message in thread
From: Andrej Borsenkow @ 2000-06-27 14:18 UTC (permalink / raw)
To: ZSH workers mailing list
[-- Attachment #1: Type: text/plain, Size: 134 bytes --]
If fork() fails, newptycmd() could close random descriptor. Pretty rare,
I admit, but not improbable.
-andrej
Have a nice DOS!
B >>
[-- Attachment #2: zpty.diff --]
[-- Type: application/octet-stream, Size: 301 bytes --]
--- Src/Modules/zpty.c.org Tue Jun 27 18:10:47 2000
+++ Src/Modules/zpty.c Tue Jun 27 18:14:11 2000
@@ -279,7 +279,6 @@
}
if ((pid = fork()) == -1) {
close(master);
- close(slave);
zwarnnam(nam, "couldn't create pty command: %s", pname, 0);
return 1;
} else if (!pid) {
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-06-27 14:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-27 14:18 PATCH: zpty.c - slave used before set warning Andrej Borsenkow
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).