Hey guys,
Just wondering is there anyway that I would be able to run a detached process that would continue to run regardless of me being logged into the linux host?
To run a detached command you need to redirect all file descriptors so the terminal isn't waiting for them to close. In BASH:
'outfile' and 'errfile' can be /dev/null as well if you don't need to save any output. If you're not using bash, ignore the the 'disown'.
again I'm sorry but I'm really noob at this. also what directory should i be making this to? presumably the root?
Quote:
Originally Posted by Corona688
To run a detached command you need to redirect all file descriptors so the terminal isn't waiting for them to close. In BASH:
'outfile' and 'errfile' can be /dev/null as well if you don't need to save any output. If you're not using bash, ignore the the 'disown'.
It means what it says: You don't have permissions to create 'outfile' or 'errfile' in that directory. What directory are you in?
Quote:
again I'm sorry but I'm really noob at this. also what directory should i be making this to? presumably the root?
What you save where, depends entirely on what you wish to save, where. But quite probably not into root. If you don't know, try your home directory.
Also, you forgot the '& disown' bit. That's the bit that actually makes it a background process so you can't forget that.
And remember, if you don't actually need to save any output from this program, you can make all of them /dev/null and it will save nothing nowhere.
Hi I have a perl script where i created 3 nmap scans and the results will output to a text file. But when i run the code the first ip address gets scanned then the others after, but i want to be able to choose which ip address to scan.
Here is my code:
(`nmap -v -r 99.xxx.xxx -p... (0 Replies)
get email notification from from system when a process from XXXX user takes longer than 15 min run.Let me know the time estimation for the same.
hi ,any one please tell me , how to write a script to get email notification from system when a process from as mentioned above a xxxx user takes... (1 Reply)
I recently ran some patching on a Solaris 10 server and as per normal procedure I detached the LVM root disk mirrors first to preserve the pre-patching copy of the OS.
During the patching, I ran into some issues which I managed to resolve and completed the patching. However, I was looking around... (5 Replies)
Hi All,
I am creating detached threads using pthread_create(). As we know, we need to pass the thread attribute structure as an argument to the pthread_Create() API.
I want to know what is the good time to destroy this thread attributes using pthread_attr_destroy() call. Also, I want to know... (2 Replies)
Hi All,
I have scenario where my callback function data_update() can be called anytime. I have written the function data_update() such that it will create detached thread for processing the data sent to this function.
data_update()
{
pthread_attr_t attr_thread;
... (1 Reply)
Hi,
Am new to HPUX . I need your assistance..
I had attached a Clariion(storage) LUN into HPUX machine, devices with 2GB(c8t0d0) and 1GB(c8t0d1) space. Later some point of time, detached these devices from HPUX machine and executed 'insf' command to build the new devices directory special... (4 Replies)
Hello,
I have created program that run threads one by one, maximum 100. Each thread will process one block of data, and once it`s finished, new thread is created with new block of data....etc
I have array of values to control status of each thread, like this:
array_thread_status=1... (11 Replies)
Hi,
I am stuck up with a strange problem.
I am writing an application - a kinda tracker that reads data from memcache and invokes theads to process each record of the memcache.
I dont want to join all my threads because my tracker should poll the cache in regular intervals say sum 300... (2 Replies)
Hi,
I am running Solaris 8 on Sun server with 2 hard drives. I have configured mirroring on the system using DiskSuite tool in order to have the same data on both disks. Now I want to perform some software upgrade and I would like to use the second disk as a backup disk. This means taking this... (3 Replies)
I have a script that needs to run under ID say "xyz". the way I do normally is to "su" to the id, enter the password of "xyz" and run the process. However, is there any way run the process under "xyz" without "su" to the ID. A person with root access would be able to run any process under any ID as... (4 Replies)