[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Background process I\O redirection
- To: Shlomi Fish <shlomif(at-nospam)techst02.technion.ac.il>
- Subject: Re: Background process I\O redirection
- From: guy keren <choo(at-nospam)actcom.co.il>
- Date: Tue, 19 Jun 2001 13:49:11 +0300 (EET DST)
- cc: <milesteg(at-nospam)surfree.net.il>, <linux-il(at-nospam)linux.org.il>
- Delivered-To: linux.org.il-linux-il@linux.org.il
- In-Reply-To: <Pine.GSO.4.33.0106172040210.8659-100000@techst02.technion.ac.il>
- Sender: linux-il-bounce(at-nospam)cs.huji.ac.il
On Sun, 17 Jun 2001, Shlomi Fish wrote:
> > (gdb) print open("/dev/tty4", 0) /* '0' stands for O_RDONLY */
> > $ = 4
> > (gdb) print dup2(4, 0);
> > $ = 0
> > (gdb) print open("/dev/tty4", 01) /* '01' stands for O_WRONLY */
> > $ = 5
> > (gdb) print dup2(5, 1);
> > $ = 0
> > (gdb) print dup2(5, 2);
> > $ = 0
>
> Wait a second - will gdb call functions for me if I do that with print()
> and not with its call command? I don't know what to think of this feature.
what do you _want_ to think about tihs feature? its very useful, when you
want to properly print out the return value of a function call, for
example, so you can use it later on.
> It could be dangerous because I can mess things with a simple print. But
> it's probabably handier than call().
anything you do inside a debugger could be dangerous. if its a
time-critical program, just the fact that you've attached a debugger to
it, could make it crash, lose data or kill the mission to mars (if you
happen to be debugging the PathFinder ;) ).
--
guy
"For world domination - press 1,
or dial 0, and please hold, for the creator." -- nob o. dy
=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il