A process is running in the foreground if its process group is the same as its terminal's foreground process group.
To put a process in background, you can create a new process group for your process (with setpgid, for example), and then change the controlling terminal's foreground process group to a different one (like the process group id of the parent process, for example). This program will run in the foreground if you pass no arguments to it, and in the background if you pass any arguments:
But as Corona688 said: that's more on that. I tried to show you only the basic idea and code on this subject. Get your Unix Programming book and read it to understand this subject in deep.
These 2 Users Gave Thanks to pflynn For This Post:
hi there,
i was reading about the exec() function. and if i m not wrong, exec() kills your present process and starts a new process in its place. the process id remains the same.
then it says if exec is successful the text data and stack are overlayed by new file! -
i dont get this part "only... (2 Replies)
Hi,
Ho do I differentiate system call from library call?
for example if I am using chmod , how do I find out if it is a system call or library call?
Thanks
Muru (2 Replies)
Hi ,
Can anybody name any System Function in C/C++ for Sun-Solaris (unix) platform which can serve the alternative of execl() system function.
Actually I am calling a fork-execl() pair and then making an interprocess communication between these two(parent-child process). But the problem is... (3 Replies)
I am new in Perl.
I am working in simple script and the varibles are working well outside the exec or system command.
but they don't work as parameters to exec or system command.
The script is attached.
please help. (8 Replies)
Hi,
I have to run two commands one after another from a c program. How can i do this with exec system calls. i tried giving them as argument to execv but it is not working.please help
thanks (3 Replies)
I have a cgi script which is called after certain time interval, which has this:
system ("ls -l /tmp/cgic* | grep -v \"cgicsave.env\" | awk '{print $5}'");
During the execution of this script,the output is 0 sometimes. But due to this the system call is not working at all and doesnt o/p... (2 Replies)
hi everyone
i wrote a system call and compiled the kernel succesfully...
my system call is in a file in the kernel folder named my_syscall1.c (kernel/my_syscall1.c)
the header file for this system call i added it in the folder include like this include/my_syscall1/my_syscall1.h
my problem is... (2 Replies)
Discussion started by: demis87
2 Replies
LEARN ABOUT CENTOS
doveadm-exec
DOVEADM-EXEC(1) Dovecot DOVEADM-EXEC(1)NAME
doveadm-exec - easily execute commands from Dovecot's libexec_dir
SYNOPSIS
doveadm [-Dv] exec binary [binary arguments]
DESCRIPTION
This command allows administrators and local users to simply execute commands from within libexec_dir. So for example a logged in system
user could start a pre-authenticated imap session, using the command: doveadm exec imap. An administrator would use the command: doveadm
exec imap -u username.
OPTIONS
Global doveadm(1) options:
-D Enables verbosity and debug messages.
-v Enables verbosity, including progress counter.
ARGUMENTS
binary the name of an executable located in /usr/libexec/dovecot.
binary arguments
options and arguments, wich will be passed through to the binary.
EXAMPLE
This example demonstrates how to deliver a message from a file to a user's mailbox.
doveadm exec dovecot-lda -d user@example.net
-f admin@example.net < ~/stuff/welcome.msg
REPORTING BUGS
Report bugs, including doveconf -n output, to the Dovecot Mailing List <dovecot@dovecot.org>. Information about reporting bugs is avail-
able at: http://dovecot.org/bugreport.html
SEE ALSO doveadm(1), dovecot-lda(1)Dovecot v2.2 2013-08-05 DOVEADM-EXEC(1)