LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-24-2005, 09:04 AM   #16
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239

the closest I've got is:

Code:
ileaf &                            # this usually sigsevs when the xterm exits
exec 2>&1 > log    fg    # need to type it wice
only prob is the xterm dies too!

 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 02-01-2005, 08:52 PM   #17
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Original Poster
Rep: Reputation: 130Reputation: 130
Hmmm...Seems like the right idea, but I guess having the xterm crash wouldn't be such a good thing. :-)
I appreciate all your posts.

Thanks for your help.

--Dane
 
Old 08-07-2011, 12:16 AM   #18
ddog123
LQ Newbie
 
Registered: Aug 2011
Posts: 1

Rep: Reputation: Disabled
I know this is very late, however decided to post this.

After the program is started in background, lets say with the PID 3798.

ls -l /proc/3798/fd - lists the fd's assigned to the process.

start gdb with: gdb -p 3798
after bunch of output run

p close(1)
p creat("/tmp/foo",0600)
q
y

run ls -l /proc/3798/fd again. You should see /tmp/foo be assigned the fd of 1

Last edited by ddog123; 08-07-2011 at 01:47 AM. Reason: Didn't get what was asked, too fast to post
 
2 members found this post helpful.
Old 08-08-2011, 09:03 PM   #19
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Original Poster
Rep: Reputation: 130Reputation: 130
Thanks for the reply, however late, ddog123! I haven't looked at this in a long time, but next time I have an excuse to do so, I'll give that a shot. I don't really understand what you're doing, but I'll look into it and post back when I get around to doing so. (Could be a while...)

Again, thanks!

--Dane
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
redirecting output of compile to a file halfcan Linux - Hardware 1 02-05-2005 10:01 PM
Redirecting mplayer output driptray Linux - Software 1 10-12-2004 07:42 AM
redirecting output in Bourne shell trutnev Linux - Software 2 04-22-2004 03:55 AM
redirecting xmms output durden2.0 Linux - Software 0 03-06-2004 07:29 PM
bash: interaction with background processes ... cdex Programming 5 08-11-2002 02:42 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration