Re: Bug in set/gethostname.

Peter T. Breuer (
Mon, 18 May 1998 01:12:05 +0200 (MET DST)

"A month of sundays ago Michael Elizabeth Chastain wrote:"
> In my humble opinion, sys_gethostname should acquire the semaphore
> before calling strlen on system_utsname.nodename. That way, gethostname
> will return either the old name or the new name, but not some mongrel
> mixture of the two.

You don't need to acquire a semaphore on read, do you? Surely only on
write? It doesn't matter if two people read the same data
simultaneously, so long as no two people write it simultaneously ...


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to