Executing the process from the background using the ampersand (&) at the end of the command and closing the terminal/shell will result in the command getting interrupted/exiting.
nohup will work and so will screen. Have a look at the screen command.
Hi!
I currently run a very long script (two hour left...) on a remote computer through a ssh session. I wonder whats happend if I close the ssh session, or even, the terminal. Is the script running on remote will stop?
Thanks for your answers,
Tp (1 Reply)
for all friends
i am using linux enterprise 4. i installed oracle 10g
in user name oracle.at the end of install i got a pop up window
saying that u should run the following scripts(root.sh,orainstRoot.sh) in terminal from root account(cui) without log out oracle account .
how i can run these... (5 Replies)
hi
while executing the following script, my terminal window is getting closed if I enter a invalid option. I want the script should go back the the command prompt. how to do achive it. i execute the script as . ./test
#! /usr/bin/ksh
Printf " Type of Installer : \n\t\t 1. Whole Build... (3 Replies)
Below is a test script to illustrate a problem from a larger script I am writing.
$ cat /tmp/loggingtest
#!/bin/bash
lvcreate -s -l 100%FREE -n var-data-snapshot vg00/var-data 2> >(logger -t "loggingtest.crit") 1> >(logger -t "loggingtest.info")
sync &
wait
lvremove -f... (1 Reply)
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)
Hey, I am trying to write a script that will open all of my session windows, and then secure shell into the appropriate server in the new windows. Seems simple, but I cant get it to work! Please help! :confused: (1 Reply)
I am running a process in nohup .
nohup getkeys.ksh 132 > 132.out &
When I close the putty terminal,The process is getting killed .
default_signal_handler called for signal no: 1
Is there a way to keep the process running even If I close the terminal (2 Replies)
Hello,
I want to create application which launches some terminal, then some command is executed on that terminal and then prevent terminal from closing.
I started to do on gnome-terminal because the Gnome is the most widely used desktop-manager in the Linux distributions.
I want to do... (3 Replies)
If I run 'who -u' interactively or from a script invoked through bash in a tty on my Ubuntu 12LTS box I get an output like this:
testuser pts/0 Dec 9 02:32 . 2163 (host.xx.yy)
running the same through cron I get:
testuser pts/0 2012-12-09 02:32 00:05 2163... (2 Replies)
Hi Guys,
I have a script that runs certain simulations in batch mode. I need to schedule some simulations to run over night.
For each simulation to complete it should be run in separate terminal.
My script is as follows
sh run_test.sh <arg1> <arg2> <arg3> ...
I need to launch this... (5 Replies)
Discussion started by: aelhosiny
5 Replies
LEARN ABOUT SUNOS
scf_card_close
SCF_Session_close(3SMARTCARD) Smartcard Library Functions SCF_Session_close(3SMARTCARD)NAME
SCF_Session_close, SCF_Terminal_close, SCF_Card_close - close a smartcard session, terminal, or card
SYNOPSIS
cc [ flag... ] file... -lsmartcard [ library...]
#include <smartcard/scf.h>
SCF_Status_t SCF_Session_close(SCF_Session_t session);
SCF_Status_t SCF_Terminal_close(SCF_Terminal_t terminal);
SCF_Status_t SCF_Card_close(SCF_Card_t card);
PARAMETERS
card An object that was returned from SCF_Terminal_getCard(3SMARTCARD)
session An object that was returned from SCF_Session_getSession(3SMARTCARD)
terminal An object that was returned from SCF_Session_getTerminal(3SMARTCARD)DESCRIPTION
These functions release the resources (memory, threads, and others) that were allocated within the library when the session, terminal, or
card was opened. Any storage allocated by calls to SCF_Session_getInfo(3SMARTCARD), SCF_Terminal_getInfo(3SMARTCARD), or SCF_Card_get-
Info(3SMARTCARD) is deallocated when the associated object is closed. Attempts to access results from these interfaces after the object has
been closed results in undefined behavior.
If a card that was locked by SCF_Card_lock(3SMARTCARD) is closed, the lock is automatically released. When a terminal is closed, any event
listeners on that terminal object are removed and any cards that were obtained with the terminal are closed. Similarly, closing a session
will close any terminals or cards obtained with that session. These are the only cases where the library will automatically perform a
close.
Once closed, a session, terminal, or card object can no longer be used by an SCF function. Any attempt to do so results in an SCF_STA-
TUS_BADHANDLE error. The sole exception is that closing an object, even if already closed, is always a successful operation.
RETURN VALUES
Closing a handle is always a successful operation that returns SCF_STATUS_SUCCESS. The library can safely detect handles that are invalid
or already closed.
EXAMPLES
Example 1: Close each object explicitly.
SCF_Status_t status;
SCF_Session_t mySession;
SCF_Terminal_t myTerminal;
SCF_Card_t myCard;
status = SCF_Session_getSession(&mySession);
if (status != SCF_STATUS_SUCCESS) exit(1);
status = SCF_Session_getTerminal(mySession, NULL, &myTerminal);
if (status != SCF_STATUS_SUCCESS) exit(1);
status = SCF_Terminal_getCard(myTerminal, &myCard);
if (status != SCF_STATUS_SUCCESS) exit(1);
/* (Do interesting things with smartcard...) */
SCF_Card_close(myCard);
SCF_Terminal_close(myTerminal);
SCF_Session_close(mySession);
Example 2: Allow the library to close objects.
SCF_Status_t status;
SCF_Session_t mySession;
SCF_Terminal_t myTerminal;
SCF_Card_t myCard;
status = SCF_Session_getSession(&mySession);
if (status != SCF_STATUS_SUCCESS) exit(1);
status = SCF_Session_getTerminal(mySession, NULL, &myTerminal);
if (status != SCF_STATUS_SUCCESS) exit(1);
status = SCF_Terminal_getCard(myTerminal, &myCard);
if (status != SCF_STATUS_SUCCESS) exit(1);
/* (Do interesting things with smartcard...) */
SCF_Session_close(mySession);
/* myTerminal and myCard have been closed by the library. */
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO libsmartcard(3LIB), SCF_Card_getInfo(3SMARTCARD), SCF_Card_lock(3SMARTCARD), SCF_Session_getInfo(3SMARTCARD), SCF_Session_getSes-
sion(3SMARTCARD), SCF_Session_getTerminal(3SMARTCARD), SCF_Terminal_getCard(3SMARTCARD), SCF_Terminal_getInfo(3SMARTCARD), attributes(5)SunOS 5.10 14 May 2002 SCF_Session_close(3SMARTCARD)