Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-18-2008, 07:02 AM   #1
LQ Newbie
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
Question ssh+script process in bakground

Dear all,

I am porting some test codes from Fedora core 2 to Fedora core works fine in FC2(2.6.5-1.358) but problem in FC8(

int main void(int)
fprintf(stderr,"hello world\n",);

$ gcc -o Pgm Pgm.c

$ vim
./Pgm &

$ /usr/bin/ssh -x -n -o BatchMode=yes cd /home/tom/Test_Dir/ '&&' ./

If i run this command hello world is not printed.
If i run this same in FC2 hello world in printed.

Whether there is solution to this or it is a bug of FC8?

Below solutions are correct?.

Solution 1:
If i do these changes i.e if i re-direct to stdout and run in background.

$ vim
./Pgm 2>&1 &

$ /usr/bin/ssh -x -n -o BatchMode=yes cd /home/tom/Test_Dir/ '&&' ./

If i run this command it works fine.

Solution 2:
./Pgm </dev/null >&/dev/null &

$ /usr/bin/ssh -x -n -o BatchMode=yes cd /home/tom/Test_Dir/ '&&' ./

Hari Krishna

Last edited by ahk_bly; 11-18-2008 at 11:06 PM.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
redirect stderr to file with a prefix? JPMallory Programming 2 12-26-2007 03:10 PM
bash stderr redirect question code-breaker Linux - Software 1 08-06-2006 04:44 AM
how do i redirect stderr to a file? nodger Programming 5 11-28-2004 11:22 AM
Any one know how to redirect standard error (stderr) to a JetDirect printer? RickMean Linux - General 2 09-03-2004 11:33 AM
TCSH: redirect stdout and stderr seperately ugenn Linux - General 2 06-06-2002 12:07 PM

All times are GMT -5. The time now is 02:50 AM.

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