lkml.org 
[lkml]   [1999]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: serial callout devices
Date
On Mon, 31 May 1999 16:43:16 -0500 (EST), 
"Alan Curry" <pacman-kernel@cqc.com> wrote:
> (
> stty 38400
>
> chat -f /usr/lib/ppp/chatscript
> case $? in
> 0) echo "Success" 1>&2
> /usr/sbin/pppd & ;;
> 4) echo "BUSY" 1>&2 ;;
> *) echo "call failed" 1>&2 ;;
> esac
> ) </dev/modem >/dev/modem

The problem with that script or any method that uses shell redirection
is that the shell tries to open /dev/modem without the O_NONBLOCK flag.
On /dev/cua* it usually works, on /dev/ttyS* it often hangs waiting for
the device to open. Remember that the shell tries to open redirectoed
files before it runs the script, without shell support for O_NONBLOCK
it is doomed to failure on /dev/ttyS*.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog