LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-02-2013, 09:07 AM   #1
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Rep: Reputation: 46
"nohup: redirecting stderr to stdout" when starting lampp


I have a newly built server that we put an older copy of lampp on. Whenever we start lampp on the server, we get this message in our ssh session
nohup: redirecting stderr to stdout
but everything appears to be working fine. What exactly does that mean? Is that causing any issues?
 
Old 04-02-2013, 09:12 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
Have a look at the startup code for the service you're starting.
Classically, in order to keep a program running after you logout, you use nohup & put it in the background ('&'), saving output thus
Code:
nohup prog >prog.log 2>&1 &
 
1 members found this post helpful.
Old 04-02-2013, 09:18 AM   #3
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
I just run a /opt/lampp/lampp start to start lampp up. I guess maybe that's just more informational then.
 
Old 04-02-2013, 09:19 AM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
As the message the OP gets state, nohup automatically redirects stderr to stdout, so the
Code:
2>&1
part of the command is not necessary, a simple
Code:
nohup prog >prog.log &
should be sufficient.

@rjo98: This is a standard message, nothing to worry about.
 
1 members found this post helpful.
Old 04-02-2013, 09:20 AM   #5
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
Ok, thanks TobiSGD. It didn't sound very ominous to me, but I figured I'd double check with you guys here.
 
Old 04-02-2013, 08:19 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
Quote:
nohup automatically redirects stderr to stdout
sort of true
The man page says
Quote:
If standard error is a terminal, redirect it to standard output.
.
NOTE: your shell may have its own version of nohup, which usually
supersedes the version described here. Please refer to your shell’s
documentation for details about the options it supports.
so I always specify where I want it explicitly, rather than make any assumptions or exceptions for terminal invocations.
 
1 members found this post helpful.
Old 04-02-2013, 08:23 PM   #7
rjo98
Senior Member
 
Registered: Jun 2009
Location: US
Distribution: RHEL, CentOS
Posts: 1,668

Original Poster
Rep: Reputation: 46
So it sounds like that message i'm getting just means that lampp is automatically doing that by itself then already, and is normal. I think....
 
Old 04-02-2013, 08:35 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
Probably, but as its evidently a shell script, you can check the code as I suggested.
 
Old 04-03-2013, 12:51 AM   #9
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Quote:
Originally Posted by chrism01 View Post
sort of true
The man page says

so I always specify where I want it explicitly, rather than make any assumptions or exceptions for terminal invocations.
Thanks for the clarification.
 
Old 04-03-2013, 09:30 PM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
No worries

Also, I tend to be very explicit/old-skool on some stuff because I've worked on various versions of Linux and Solaris & HP-UX ...
Its too hard to remember all the variations/defaults and its clearer when I or anyone else reads my stuff
 
  


Reply


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
[SOLVED] Weird thing in redirecting stdout and stderr brubizu Linux - Software 2 07-01-2010 12:09 PM
example for redirecting stderr,stdout in seperate files using two way pipes concept nagendrar Programming 0 07-06-2009 07:08 AM
Redirecting stdout, stderr to pty0? Rostfrei Linux - General 4 03-20-2007 04:15 AM
redirecting stdout to /dev/null and stderr to stdout? Thinking Programming 1 05-18-2006 03:36 AM
redirecting stdout and stderr to a file Avatar33 Programming 4 03-12-2005 08:55 AM


All times are GMT -5. The time now is 11:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration