openSUSE Forums > Programming/Scripting » Retrieving standart output from a running process

Go Back   openSUSE Forums > Programming/Scripting
Forums FAQ Members List Search Today's Posts Mark Forums Read


Programming/Scripting Questions about programming, bash scripts, perl, php, cron jobs, ruby, python, etc.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-Sep-2009, 18:01
Puzzled Penguin
 
Join Date: Sep 2009
Posts: 2
jlgm hasn't been rated much yet
Default Retrieving standart output from a running process

Hi there, I need to catch the output from a proccess launched during the boot sequence by initd. I need to redirect the standart output to the current shell (a telnet connection embeded on my QT software).

Thanks in advance for your time.
Reply With Quote
  #2 (permalink)  
Old 05-Sep-2009, 04:13
Explorer Penguin
 
Join Date: Jul 2008
Location: Voorhout, Netherlands
Posts: 231
LittleRedRooster is on a distinguished reputation roadLittleRedRooster is on a distinguished reputation road
Default Re: Retrieving standart output from a running process

jlgm wrote:
> Hi there, I need to catch the output from a proccess launched during the
> boot sequence by initd. I need to redirect the standart output to the
> current shell (a telnet connection embeded on my QT software).
>
> Thanks in advance for your time.


A process that has been started without controlling tty (like those by initd)
cannot be connected to a tty afterwards, but most init processes write to syslog,
so your best bet is the syslog-ng config file to direct the output of this
process to a tty where you can read it.

Theo
Reply With Quote
  #3 (permalink)  
Old 09-Sep-2009, 05:12
Puzzled Penguin
 
Join Date: Sep 2009
Posts: 2
jlgm hasn't been rated much yet
Red face Re: Retrieving standart output from a running process

Quote:
Originally Posted by LittleRedRooster View Post
A process that has been started without controlling tty (like those by initd)
cannot be connected to a tty afterwards, but most init processes write to syslog,
so your best bet is the syslog-ng config file to direct the output of this
process to a tty where you can read it.

Theo
Thanks for the help, but in my situation this is not a chance. My application opens an embeded telnet connection with the machine which host the process. I log as root in the telnet tty, so I have no rights problem but the host system is an linux embeded machine so I can not modify any file on it (for guarantee purposes) and that system does not use any syslog like stuff that I can read. Its a minimal system.

Thanks again LittleRedRooster.

PD: Sorry for my poor english
Reply With Quote
Reply

Bookmarks


Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




 

Search Engine Friendly URLs by vBSEO 3.3.0 RC2