Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to create a dummy process of a process already running? Post 302134523 by fazliturk on Friday 31st of August 2007 10:22:59 AM
Old 08-31-2007
As much as I understood .You want to see your background process named something with ps ;

ps -ef |grep processname gives this.

there is no need to infinite loop. just;

echo "input someting : \n "
read input1
echo $input1

untill you input anything process waits.when you enter finishes.while waiting input you can check the process in on other screen. and you can start multiple processes.
 

10 More Discussions You Might Find Interesting

1. Programming

How to create constantly running process

Ther are two process in my program and i want both to constantly running. So i have written the following code. But one of this process which is calling function wsJobCheck() is getting terminated with giving message : Program exited normally. Can any one suggest why this is happing. Code : ... (1 Reply)
Discussion started by: bhakti
1 Replies

2. UNIX for Dummies Questions & Answers

dummy question on data process

I have a file which contains 6 columns. But I only need the first 3 columns. So I need to remove the last 3 columns. I checked 'cut' but it seems not working. So is there a command that could remove certain columns from a file? :( Thanks a lot!! (5 Replies)
Discussion started by: kaixinsjtu
5 Replies

3. Shell Programming and Scripting

script to monitor process running on server and posting a mail if any process is dead

Hello all, I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted. Thanks in advance Regards, pradeep kulkarni. :mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies

4. Shell Programming and Scripting

Create a html file if a process is running??

Hi All, I need to check for a process, if the process is running then I have to create an HTML file, say A.HTML. If the process is not running then I have to rename the existing html, say A.HTML to B.HTML so that the process which looks for the file A.HTML does not find it? How do I do... (1 Reply)
Discussion started by: Hangman2
1 Replies

5. UNIX for Dummies Questions & Answers

Running different process from current process?

I have been having some trouble trying to get some code working, so I was wondering...what system calls are required to execute a different program from an already running process? (1 Reply)
Discussion started by: Midwest Product
1 Replies

6. UNIX for Dummies Questions & Answers

How a process can check if a particular process is running on different machine?

I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
Discussion started by: saurabhnsit2001
2 Replies

7. BSD

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (0 Replies)
Discussion started by: naveeng
0 Replies

8. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (1 Reply)
Discussion started by: naveeng
1 Replies

9. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (6 Replies)
Discussion started by: naveeng
6 Replies

10. Shell Programming and Scripting

Command to get exact tomcat process I am running ignoring other java process

Team, I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list. How do I get my exact tomcat process running and that is unique? via shell script? (4 Replies)
Discussion started by: Ghanshyam Ratho
4 Replies
READPASSPHRASE(3)					   BSD Library Functions Manual 					 READPASSPHRASE(3)

NAME
readpassphrase -- get a passphrase from the user SYNOPSIS
#include <readpassphrase.h> char * readpassphrase(const char *prompt, char *buf, size_t bufsiz, int flags); DESCRIPTION
The readpassphrase() function displays a prompt to, and reads in a passphrase from, /dev/tty. If this file is inaccessible and the RPP_REQUIRE_TTY flag is not set, readpassphrase() displays the prompt on the standard error output and reads from the standard input. In this case it is generally not possible to turn off echo. Up to bufsiz - 1 characters (one is for the NUL) are read into the provided buffer buf. Any additional characters and the terminating new- line (or return) character are discarded. The readpassphrase() function takes the following optional flags: RPP_ECHO_OFF turn off echo (default behavior) RPP_ECHO_ON leave echo on RPP_REQUIRE_TTY fail if there is no tty RPP_FORCELOWER force input to lower case RPP_FORCEUPPER force input to upper case RPP_SEVENBIT strip the high bit from input RPP_STDIN force read of passphrase from stdin The calling process should zero the passphrase as soon as possible to avoid leaving the cleartext passphrase visible in the process's address space. RETURN VALUES
Upon successful completion, readpassphrase() returns a pointer to the NUL-terminated passphrase. If an error is encountered, the terminal state is restored and a NULL pointer is returned. FILES
/dev/tty EXAMPLES
The following code fragment will read a passphrase from /dev/tty into the buffer passbuf. char passbuf[1024]; ... if (readpassphrase("Response: ", passbuf, sizeof(passbuf), RPP_REQUIRE_TTY) == NULL) errx(1, "unable to read passphrase"); if (compare(transform(passbuf), epass) != 0) errx(1, "bad passphrase"); ... memset(passbuf, 0, sizeof(passbuf)); ERRORS
[EINTR] The readpassphrase() function was interrupted by a signal. [EINVAL] The bufsiz argument was zero. [EIO] The process is a member of a background process attempting to read from its controlling terminal, the process is ignoring or blocking the SIGTTIN signal, or the process group is orphaned. [EMFILE] The process has already reached its limit for open file descriptors. [ENFILE] The system file table is full. [ENOTTY] There is no controlling terminal and the RPP_REQUIRE_TTY flag was specified. SIGNALS
The readpassphrase() function will catch the following signals: SIGALRM SIGHUP SIGINT SIGPIPE SIGQUIT SIGTERM SIGTSTP SIGTTIN SIGTTOU When one of the above signals is intercepted, terminal echo will be restored if it had previously been turned off. If a signal handler was installed for the signal when readpassphrase() was called, that handler is then executed. If no handler was previously installed for the signal then the default action is taken as per sigaction(2). The SIGTSTP, SIGTTIN and SIGTTOU signals (stop signals generated from keyboard or due to terminal I/O from a background process) are treated specially. When the process is resumed after it has been stopped, readpassphrase() will reprint the prompt and the user may then enter a passphrase. SEE ALSO
sigaction(2), getpass(3) STANDARDS
The readpassphrase() function is an extension and should not be used if portability is desired. HISTORY
The readpassphrase() function first appeared in OpenBSD 2.9. BSD
May 31, 2007 BSD
All times are GMT -4. The time now is 11:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy