Commit Graph
3 Commits
Author SHA1 Message Date
Rich Felker c0fe5b9da9 check for fd exhaustion in forkpty
we cannot report failure after forking, so the idea is to ensure prior
to fork that fd 0,1,2 exist. this will prevent dup2 from possibly
hitting a resource limit and failing in the child process. fcntl
rather than dup2 is used prior to forking to avoid race conditions.
2011-07-22 00:25:56 -04:00
Rich Felker 10d7561db5 properly create new session/controlling terminal in forkpty 2011-04-20 21:01:42 -04:00
Rich Felker 4921ce0867 implement (nonstandard) forkpty 2011-04-20 20:55:13 -04:00