* just curious!
@ 2005-10-06 12:11 Suma Choudhary
2005-10-06 12:41 ` David Eduardo Gómez Noguera
2005-10-08 7:17 ` Glynn Clements
0 siblings, 2 replies; 4+ messages in thread
From: Suma Choudhary @ 2005-10-06 12:11 UTC (permalink / raw)
To: linux-c-programming
Hello all
I was curious to know how the "write" command works.Any IPCs used?
thanks
suma
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: just curious!
2005-10-06 12:11 just curious! Suma Choudhary
@ 2005-10-06 12:41 ` David Eduardo Gómez Noguera
2005-10-08 7:17 ` Glynn Clements
1 sibling, 0 replies; 4+ messages in thread
From: David Eduardo Gómez Noguera @ 2005-10-06 12:41 UTC (permalink / raw)
To: linux-c-programming
On Thu, 2005-10-06 at 17:41 +0530, Suma Choudhary wrote:
> Hello all
> I was curious to know how the "write" command works.Any IPCs used?
>
> thanks
> suma
*Use the force^source Luke*
you can play with strace and ltrace too
the manpage also helps.
--
David Eduardo Gómez Noguera <davidgn@servidor.unam.mx>
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: just curious!
2005-10-06 12:11 just curious! Suma Choudhary
2005-10-06 12:41 ` David Eduardo Gómez Noguera
@ 2005-10-08 7:17 ` Glynn Clements
1 sibling, 0 replies; 4+ messages in thread
From: Glynn Clements @ 2005-10-08 7:17 UTC (permalink / raw)
To: Suma Choudhary; +Cc: linux-c-programming
Suma Choudhary wrote:
> I was curious to know how the "write" command works.Any IPCs used?
It determines the terminal(s) on which the specified user is logged in
from the utmp file, opens the terminal device for writing, and writes
to it.
Note that the terminal device must be group-writeable (normally
controlled using "mesg y" or "mesg n"). The write command itself is
setgid tty.
--
Glynn Clements <glynn@gclements.plus.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: just curious!
@ 2005-10-10 2:25 Suma Choudhary
0 siblings, 0 replies; 4+ messages in thread
From: Suma Choudhary @ 2005-10-10 2:25 UTC (permalink / raw)
To: glynn; +Cc: linux-c-programming
Thanks a lot.....
I got to know about the utmp file and the terminal device from the strace and ltrace as suggested by David Eduardo.Could even write a small code to emulate "write".
Didnt know about "mesg" though.
Thanks again
suma
>>> Glynn Clements <glynn@gclements.plus.com> 10/08/05 12:54 PM >>>
Suma Choudhary wrote:
> I was curious to know how the "write" command works.Any IPCs used?
It determines the terminal(s) on which the specified user is logged in
from the utmp file, opens the terminal device for writing, and writes
to it.
Note that the terminal device must be group-writeable (normally
controlled using "mesg y" or "mesg n"). The write command itself is
setgid tty.
--
Glynn Clements <glynn@gclements.plus.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-10-10 2:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-06 12:11 just curious! Suma Choudhary
2005-10-06 12:41 ` David Eduardo Gómez Noguera
2005-10-08 7:17 ` Glynn Clements
-- strict thread matches above, loose matches on Subject: below --
2005-10-10 2:25 Suma Choudhary
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).