Steve Reid
12/11/2008 12:20 PM
post18433
|
Here's a question about another old PR.
PR 24628 says:
Under certain, yet unclear conditions, ttyname() rsp. ttyname_r() can
fail with errno code ESRCH. This case is not documented.
I looked at the code for ttyname_r(), and it calls:
devctl()
ConnectServerInfo()
netmgr_ndtostr()
strlen()
strcpy()
According to our docs, the only one of these that can give ESRCH is ConnectServerInfo(), and that occurs if the process
with the given pid doesn't exist. However, ttyname() calls it with a pid of 0.
Any ideas where the ESRCH could be coming from?
Thanks.
|
|
|