[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ProgSoc] file locking
> On Wed, Apr 24, 2002 at 11:14:24AM +1000, Nicholas FitzRoy-Dale wrote:
> > This triggers a related question - does anybody know how sharing of
> > serial ports is dealt with in Linux? If I open the port and set it
> > for, say, 9600,N,1, can another process open the port as well?
> > Assuming they can (seems reasonable), is the new process then
> > prevented from changing the speed and parity, or do they get to
> > fight it out?
They fight it out -- as long as they're priviledged enough to do so.
CAP_SYS_ADMIN or the artist formerly known as root is sufficient to
override any previous parity settings. This is because parity setting is
done via an ioctl(), and ioctl() calls (generally speaking) require that
priviledge.
Dave
-
You are subscribed to the progsoc mailing list. To unsubscribe, send a
message containing "unsubscribe" to progsoc-request@nospam.progsoc.uts.edu.au.
If you are having trouble, ask owner-progsoc@nospam.progsoc.uts.edu.au for help.