#include <strings.h>
...
foo = (char *)strdup(...);
To:
#include <string.h>
foo = strdup(...);
because the former segfaults on an ia64 since there is no prototype
for strdup() in strings.h. Converting an "int" to a pointer is fatal.
in uu_lock(). Add uu_lockerr() for turning the results of
uu_lock into something printable. Remove bogus section in man page
about race conditions allowing both processes to get the lock.
Include libutil.h and use uu_lock() correctly where it should.
Suggested by: ache@freebsd.org
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
do it themselves. (Some of these programs actually depended on this
beyond compiling the definition of struct ifinfo!) Also fix up some
other #include messes while we're at it.
current unit number, and the "new" unit number of -1. This allows the
script to actually deconfigure the SLIP interface (e.g. by running
"ifconfig delete") which has been impossible previously.
This is most likely a candidate for 2.1, too.
slattach always exited early because fd is not open in acquire_line().
Other (trivial) changes that I've been neglecting for some time:
- Turn off O_NONBLOCK so that `chat' doesn't need to worry about it
(`chat' actually does worry about it).
- Really set speeds POSIXly :-). cfsetspeed() isn't POSIX.
- Fix spelling error in comment.
- Gripe about bad programming of doing everything from signal handlers.
slattach should be written to do everything from the sigsuspend() loop,
but I don't want to do it :-).
From me:
Use .PATH to find uucplock.c
Submitted by: bde
-K #: set SLIP keepalive timeout
-O #: set SLIP outfil timeout
-U #: set SLIP unit number
sighup handler now sets tty disc for non-redial case too.
Implement SIGURG handling (from keepalive).
POSIXing speed settings.
established. This way, automatic scripts are possible that might
control the SLIP connection. It's unacceptable for a daemon that's
being controlled by a variety of signals to not leave its PID
somewhere. The file name contains the terminal path name component of
the associated tty device, so it should be unique even with multiple
parallel slattach's running. The file will be unlinked at regular exit.
Also found a minor bug in the option handling by compiling with -Wall.