diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-07-22 00:25:56 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-07-22 00:25:56 -0400 |
commit | c0fe5b9da9f98b83262717c0090817f1fbb3d8a0 (patch) | |
tree | af009ffeef44eb430a850edaedb0f544ce3e88d0 /src/ctype | |
parent | d40e344f7b311980dfe3c165d8cbecfe04c12bd2 (diff) | |
download | musl-c0fe5b9da9f98b83262717c0090817f1fbb3d8a0.tar.gz musl-c0fe5b9da9f98b83262717c0090817f1fbb3d8a0.tar.xz musl-c0fe5b9da9f98b83262717c0090817f1fbb3d8a0.zip |
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.
Diffstat (limited to 'src/ctype')
0 files changed, 0 insertions, 0 deletions