473,385 Members | 1,912 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Linux Services

Hello,

I am writing a service for Linux I have written all the code. Here's what’s wrong I hope you can help. When the service runs it checks several things, this need to be visible to the user. Afterward it listens on a port and because its listening it stop and doesn’t return the user to the shell it just carries on waiting. This is a problem when the server start as is obviously doesn’t complete the setup it stops and waits for the program to finish listening which it doesn’t. How can I get around this? I have tried "> /dev/null" it does work but hides all of the information to the user.

Any ideas?

Thanks
Mar 6 '08 #1
5 2101
jabbah
63
maybe

yourservice &

is what your looking for?

or rather

nohup yourservice &
Mar 6 '08 #2
When I use "nohup" it still waits instead of quiting.
Mar 6 '08 #3
Also, question how do I create a pidfile when my app runs?
Mar 6 '08 #4
jabbah
63
When I use "nohup" it still waits instead of quiting.
from what I understood you dont want it to quit, do you?

putting an ampersand & at the end of the command line will make the process go to the background.

e.g.

sleep 3 &
will go to the background and you have 3 seconds to do ps to see that the process is running.

I dont remember precisely what nohup does but its got something to do with stop listening to signals, anyways man nohup will tell you.
and while youre at, you may want to look at man fg and man bg
Mar 6 '08 #5
Perfect thanks! It was & then sleep 3 :)
Mar 6 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Google Mike | last post by:
After a lot of thought and research, and playing with FreeTDS and InlineTDS, as well as various ODBC connections, I have determined that the fastest and cheapest way to get up and going with PHP on...
6
by: Smitro | last post by:
Hi, I'm looking for a Tutorial about Authenticating using PHP and Linux User Accounts. Can some one point me in the right direction? Smitro
3
by: bruce | last post by:
hi... i'm running rh8.0 with gnome.. i'm not sure of the version (it's whatever rh shipped). i've recently updated (or tried to update) python to the latest version. when i try to run the...
4
by: John | last post by:
"Networking software maker Novell on Monday boosted its Linux portfolio with the acquisition of Linux software maker Ximian for an undisclosed sum. The purchase of Ximian's desktop Linux software...
383
by: John Bailo | last post by:
The war of the OSes was won a long time ago. Unix has always been, and will continue to be, the Server OS in the form of Linux. Microsoft struggled mightily to win that battle -- creating a...
27
by: Mike | last post by:
Open source programs in general suck pretty bad also. Here are some loose facts regarding why projects like Linux, PHP, MYSQL, and other open source programs suck: - Linux is simply a clone of...
5
by: Larry | last post by:
I'm interested in interfacing Linux applications from C#. Has anyone done this before? My firm has a few linux applications and I'd like to make the information available to new applications that...
4
by: Jonah Olsson | last post by:
Dear All, I'm currently developing a solution where large amounts of personalised emails are being created (and no, this is not spam...) on the ASP.NET platform and being delivered by a Debian...
1
by: Murali | last post by:
Greetings from Pivot Systems, Inc.!!! Pivot Systems, Inc. established in 1997 is a global software services company, California corporation with several customers in the Silicon Valley,...
2
by: Sean Davis | last post by:
I have read a couple of blogs suggesting that pyodbc is buildable under linux. I am running suse 10.2 on a 64-bit intel machine with unixODBC installed. Upon building, I get a slew of pretty...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.