Umm, could this possibly be the source of your problem?

Ed G.

PS:  a simple workaround is run in diald in non-daemon mode, i.e., 
include -daemon in your diald.conf file.

------- Forwarded Message Follows -------
From:                   "Ed G." <[EMAIL PROTECTED]>
To:                     [EMAIL PROTECTED]
Date sent:              Thu, 7 Oct 1999 20:12:25 -0400
Subject:                chat fails due to diald bug?
Send reply to:          [EMAIL PROTECTED]
Copies to:              [EMAIL PROTECTED]

On my setup (LRP 2.9.4 running diald-99-1 and kernel 2.2.11), chat 
 works fine when slip is the proxy device, but fails when using  
ethertap: 

Oct  7 16:39:10 myrouter2 diald[538]: running '/usr/sbin/chat -v -f 
/etc/chatscripts/provider' 
Oct  7 16:39:10 myrouter2 chat[556]: Can't get terminal 
parameters: Invalid argument 
Oct  7 16:39:10 myrouter2 diald[538]: SIGCHLD[4]: pid 555 dial, 
status 512 
Oct  7 16:39:10 myrouter2 diald[538]: Connect script failed. 

strace shows chat dying when it is unable to open STDIN (file  
descriptor zero): 

556 <chat>   16:39:10 ioctl(0, TCGETS, 0xbffffcf8) = -1 EINVAL 
(Invalid argument) 
556 <chat>   16:39:10 send(2, "<147>Oct  7 16:39:10 chat[556 
<chat>]: "..., 80, 0) = 80 
556 <chat>   16:39:10 sigaction(SIGPIPE, {SIG_DFL}, NULL) = 0 
556 <chat>   16:39:10 _exit(2)                 = ? 

It seems diald is inadvertently closing the modem fd in run_shell  
before it starts chat. Function run_shell closes closes file  
descriptors 0, 1 and 2 (STDIN, STDOUT and STDERR) and then  
creates new file descriptors for STDIN and STDOUT pointing to the  
modem.   

The assumption appears to be that the modem fd will never be less 
 than 3.   

Unfortunately, this appears not to be the case.    

strace shows diald returning a file descriptor of 2 for the modem  
when ethertap is loaded: 

538 <diald>   16:39:09 open("/dev/ttyS0", 
O_RDWR|O_NONBLOCK) = 2 







-
To unsubscribe from this list: send the line "unsubscribe linux-
diald" in
the body of a message to [EMAIL PROTECTED]


-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]

Reply via email to