Launch application in background


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Launch application in background
# 1  
Old 04-23-2010
Launch application in background

Hi,
I would launch a script in background.
I've tried in this way:

Quote:
./startPFSCoordinator.sh &
But it doesn't work.
The sh launch a java application.
How can I solve?
Thanks, bye bye.
# 2  
Old 04-23-2010
What does it do when you try to run the script that way? Also, is there any output if you run the "jobs" command after trying to run the script?
# 3  
Old 04-23-2010
Yes, there is output.
# 4  
Old 04-23-2010
What is the output? It would be helpful if you could copy and paste the relevant parts of your shell session.
# 5  
Old 04-26-2010
The output is:

Quote:
[gaia_user@server04 PFSCoordinator_0.8]$ ./startPFSCoordinator.sh &
[4] 1127
[gaia_user@server04 PFSCoordinator_0.8]$ *** Default environment assumed ***
java -cp :.:./DPCTInfraSW-0.8.jar:./jars/ant-1.7.0.jar:./jars/ant-launcher-1.7.0.jar:./jars/commons-beanutils-1.8.0.jar:./jars/commons-beanutils-bean-collections-1.7.0.jar:./jars/commons-beanutils-core-1.7.0.jar:./jars/commons-collections-3.0.jar:./jars/commons-configuration-1.1.jar:./jars/commons-digester-1.5.jar:./jars/commons-httpclient-2.0.2.jar:./jars/commons-lang-2.0.jar:./jars/commons-logging-1.1.1.jar:./jars/commons-math-2.0.jar:./jars/commons-pool-1.2.jar:./jars/derby-10.4.2.0.jar:./jars/dom4j-1.4.jar:./jars/DpcCU1TestDm-8.1.0.jar:./jars/DPCTConnectorsLibrary-0.1b.jar:./jars/fft-1.0.jar:./jars/GaiaMdbDm-8.1.0.jar:./jars/GaiaParameters-7.0.1.jar:./jars/GaiaParametersMultiDim-7.0.jar:./jars/GaiaTools-8.0.0.jar:./jars/GSR-7.5.jar:./jars/GSRDm.jar:./jars/isorelax-20020414.jar:./jars/itext-2.0.1.jar:./jars/jama-1.0.2.jar:./jars/jaxen-1.0-FCS.jar:./jars/jboss-common-core-2.2.14.GA.jar:./jars/jboss-common-core-2.2.14.GA-sources.jar:./jars/jboss-concurrent-1.0.jar:./jars/jboss-jmx-4.0.4.jar:./jars/jboss-logging-spi-2.0.3.GA.jar:./jars/jboss-logging-spi-2.0.3.GA-sources.jar:./jars/jboss-logging-spi-2.0.5.GA.jar:./jars/jboss-remoting-2.5.0.SP1.jar:./jars/jboss-remoting-2.5.0.SP1-sources.jar:./jars/jboss-serialization-1.0.3.GA.jar:./jars/jcommon-1.0.13.jar:./jars/jfftw-1.0.jar:./jars/jfreechart-1.0.10.jar:./jars/jgroups-2.6.7.GA.jar:./jars/jhealpix-1.0.jar:./jars/jsap-2.0a.jar:./jars/junit-4.3.1.jar:./jars/log4j-1.2.12.jar:./jars/msv-20020414.jar:./jars/net-ivoa-fits-0.1.jar:./jars/ojdbc6-11.1.0.6.jar:./jars/relaxngDatatype-20020414.jar:./jars/saxpath-1.0-FCS.jar:./jars/servlet-api-2.3.jar:./jars/sqlite-3.5.9.jar:./jars/Taglets-1.0.jar:./jars/vecmath-1.0.jar:./jars/webdavlib-2.0.jar:./jars/xalan-2.6.0.jar:./jars/xercesImpl-2.2.1.jar:. -Xmx512m -Dgaia.dpct.pfs.launcher.configurationfile=conf/dpct_pfs_coordinator.properties -Dgaia.cu1.tools.util.log.configuration=dpct_pfs_logging.properties -DTaskName=gaia.dpct.pfs.launcher.PFSCoordinatorTask -Djava.net.preferIPv4Stack=true gaia.dpct.pfs.launcher.PFSLauncher
2010-04-26 08:57:52,332 INFO [main] gaia.dpct.pfs.launcher.PFSLauncher - About to run PFSLauncher
2010-04-26 08:57:52,461 DEBUG [main] gaia.dpct.pfs.nodes.PFSLogManagerImpl - Creating PFSLogManager
2010-04-26 08:57:52,497 INFO [main] gaia.dpct.pfs.nodes.PFSLogManagerImpl - PFSLogsManager is becoming a MBean
2010-04-26 08:57:52,655 DEBUG [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - Object ConfigurationTrackingManagerImpl is being created
2010-04-26 08:57:52,655 DEBUG [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - Read properties: Source properties, Source File file.xml, Persistent true, Restrict Mode false
2010-04-26 08:57:52,661 INFO [main] gaia.dpct.configurationtrack.JdbcConfigurationTrackingPersistenceManager - Getting wb store using oracle.jdbc.driver.OracleDriver/jdbcSmilieracle:thin:@(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.10.14)(PORT = 1521)) (LOAD_BALANCE = yes) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = SINGLETDB.single_domain)))/INFRA/INFRA
2010-04-26 08:57:54,581 DEBUG [main] gaia.dpct.configurationtrack.JdbcConfigurationTrackingPersistenceManager - Acquired this store : gaia.cu1.tools.dal.jdbc.JdbcStore@318efaea
2010-04-26 08:57:55,063 DEBUG [main] gaia.dpct.configurationtrack.JdbcConfigurationTrackingPersistenceManager - Checking if table JoinConfigurationToItem exists
2010-04-26 08:57:55,128 DEBUG [main] gaia.dpct.configurationtrack.JdbcConfigurationTrackingPersistenceManager - Checking if table JoinIInstanceToCInstance exists
2010-04-26 08:57:55,194 DEBUG [main] gaia.dpct.configurationtrack.JdbcConfigurationTrackingPersistenceManager - Checking if table JoinSol_BaselineToCInstance exists
2010-04-26 08:57:55,260 DEBUG [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - Object ConfigurationTrackingManagerImpl created
2010-04-26 08:57:55,260 DEBUG [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - Reading configuration from system properties
2010-04-26 08:57:55,261 DEBUG [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - Configuration : name PFS Remote Node , description PFS PFS Remote Node, substem PFS Subsystem
2010-04-26 08:57:55,262 DEBUG [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - Added Jar Item : GSR-7.5.jar
2010-04-26 08:57:55,262 DEBUG [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - Added File Item : dpct_pfs_node.properties@properties
2010-04-26 08:57:55,263 DEBUG [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - Folders :[Ljava.lang.String;@34b0ede5
2010-04-26 08:57:55,264 WARN [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - Configuration Item has not been found in running instance. Item : GSR-7.5.jar
2010-04-26 08:57:55,264 WARN [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - Configuration Item has not been found in running instance. Item : dpct_pfs_node.properties
2010-04-26 08:57:55,522 DEBUG [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - Configuration is not stored persistently
2010-04-26 08:57:55,559 DEBUG [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - Configuration Instance is not stored persistently
2010-04-26 08:57:55,748 INFO [main] gaia.dpct.configurationtrack.ConfigurationTrackingManagerImpl - created configuration instance archive configurationInstance133.zip in location conf
2010-04-26 08:57:56,104 INFO [main] org.jgroups.JChannel - JGroups version: 2.6.7.GA

-------------------------------------------------------
GMS: address is 10.1.10.14:3424
-------------------------------------------------------
When clientes connect to server new messages appear. I tried to launch it as "./startPFSCoordinator.sh &" but the application doesn't release the shell.
How can I solve?
Thansk, bye bye.
# 6  
Old 04-26-2010
Try:

Code:
./startPFSCoordinator.sh > /dev/null 2>&1 &


Last edited by verdepollo; 04-26-2010 at 11:04 AM.. Reason: extra spaces
# 7  
Old 04-26-2010
Yes, the shell has been released. See the prompt in your post:

Quote:
[gaia_user@server04 PFSCoordinator_0.8]$ ./startPFSCoordinator.sh &
[4] 1127
[gaia_user@server04 PFSCoordinator_0.8]$ *** Default environment assumed ***
But the process is writing to its controlling terminal, so you still see it in your shell. You could still enter commands and they'd run, you'd just have a hard time seeing them.

As verdepollo posted, just redirect the output from your command.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cannot get terminal application to launch with a graphical launcher when successful in terminal

I have been having an extremely annoying problem. For the record, I am relatively new at this. I've only been working with unix-based OS's for roughly two years, mostly Xubuntu and some Kali. I am pretty familiar with the BASH language, as that's the default shell for debian. Now, I've made this... (16 Replies)
Discussion started by: Huitzilopochtli
16 Replies

2. Shell Programming and Scripting

Launch Script

Hi all! I just got done writing a script. The problem Im running into is I have to lanuch the script with: sh SCRIPT.sh Is there a way to launch it with by just entering SCIPT into the shell? (3 Replies)
Discussion started by: Grizzly
3 Replies

3. Linux

Can't launch firefox

Hi all, I installed RHEL on my machine and realized that firefox browser was not included at installation. I went back and added it using the Add or Remove Packages by inserting the dvd I used during installation. The icon is there but for some reason I cannot lauch. Nothing returns when I... (12 Replies)
Discussion started by: jxh461
12 Replies

4. Linux

Launch application in gnome session of another user.

A gnome session is launched by UserA of System A, I am connected to userB of System B(or A) through PUTTY. I want to launch an application for eg: gedit through Putty in the display of system A. how can I achieve this. for eg:- root is logged in to System A, with gdm. DISPLAY=0.0, ip =... (4 Replies)
Discussion started by: Sivaswami
4 Replies

5. Programming

How to launch a new process

Hi, I have a situation where a C main program needs to call another C main program, my background is mostly Windows and I'm new to UNIX programming. I've read about system(), fork(), and exec() and I'm a little confused as to what the sequence of steps should be to launch another process. By the... (5 Replies)
Discussion started by: hr94131
5 Replies

6. UNIX for Advanced & Expert Users

launch a command only if

Hi! I would launch this command: tar -cvvf logswitch.tar `find *.log* -mtime +5` --remove-files only if find *.log* -mtime +5 find some files. Thanks in advance. (10 Replies)
Discussion started by: Minguccio75
10 Replies

7. UNIX for Dummies Questions & Answers

how to launch program though telnet

I have launched telnet on nt and have connected to a unix server, I'm trying to run a program on the unix server which will launch a gui, but when I try to launch it I get the message "display not set\n" "By default set it to 0.0" I can sit down at the unix machine and launch the program with... (3 Replies)
Discussion started by: cbachman
3 Replies

8. UNIX for Dummies Questions & Answers

how to Launch an independent process.

Hello, I needed a help please... I have an application which launches process. For this i am using fork and execv method calls. By doing this my launched process are now child process of the parent process(launching process). I dont want this to happen, i want the process that is launched to... (1 Reply)
Discussion started by: deepthi
1 Replies
Login or Register to Ask a Question