The exec() family of functions replaces the current process image with a new process image, retaining the pid and pipes of the old process.

learn more… | top users | synonyms

2
votes
1answer
142 views

exec cp failes from script, yet works when issued directly

I have a script that copies SQL backups to a windows server. Here's the line from /etc/fstab: //my.win.box/share$ /winshare cifs ...
0
votes
1answer
45 views

Why does Ubuntu 16.04 execle of a specfic C# image halt after 90 seconds while others run 24X7?

I would like to find a Ubuntu Linux 16.04 systen command similar to strace to find out why my C++ program , ServiceController.exe , which [execle ...
0
votes
1answer
334 views

Cp with full renamed path in execl c program

I need to copy file and rename it in execl function so i did: if ( fileExists(new_dest) ){ /*function in which i rename the file by gtk dialog*/ renameDialog(fileName); ...
0
votes
1answer
81 views

Cron to find exec cp and redirect output with time / date per line?

I try to setup a cron task to run a set of basic shell commands. I need to look to any files created on the last day, then copy to another folder and generate a log stating, line by line, the date ...
0
votes
1answer
940 views

what is the difference between exec and dbus-launch?

If I start a process, particularly at session start, what is the difference between using exec p and dbus-launch p?
0
votes
1answer
502 views

Order a list of files, by date modified, then unzip them in that order

I have a list of zip files, that must be extracted by date modified, they contain updated images and the strange way the local mls provides them means that newer zip files container newer versions of ...
4
votes
0answers
106 views

Is it possible to make an exec call that “returns”?

Is there a way to make the exec system call work like a function call that returns instead of totally replacing the current process image? My motivation is trying to integrate two shells with ...
2
votes
0answers
52 views

Detach from tmux and rotate to ssh without dropping exec?

I've been using tmux launched by default as part of my shell at all times for some time now and find it very convenient. At the same time ssh'ing from inside tmux to another system is not ideal ...
2
votes
0answers
287 views

PHP exec and amixer

I'm trying to make php lower the dB level of amixer using exec, but it seems like php isn't able to perform the task which requires sudo-access. What should be the best way to solve this? I tried: ...
1
vote
0answers
37 views

Copy file into all subdirectories that contains a file with certain name

I am trying to copy a features[30,55].R script from my desktop into all the subdirectories that contain a file whose name is DONE. I tried the following command: find . -name "DONE" -exec sh 'cp ...
1
vote
0answers
59 views

How to understand the output of tracing running an external command in background via strace

In Ubuntu, I run date & in an interactive bash shell whose pid is 6913, and at the same time, trace the bash shell from another interactive bash shell by strace. The output of tracing the first ...
1
vote
0answers
50 views

Programmatically obtain LILYPOND_DATADIR for execlp() call

I wrote an application that calls lilypond by execlp()ing it. However, when my app executes this line, the following error occurs: GNU LilyPond 2.16.2 warning: not relocating, no 2.16.2/ or current/ ...
0
votes
0answers
16 views

Create a background process using execle with Ubuntu 16.04's daemon function

Here is an example of the usage of Ubuntu Linux 16.04 C/C++ daemon() function: #include <unistd.h> #include <stdio.h> int main() { daemon(1, 0); while (89) printf("Lol\n"); } ...
0
votes
0answers
70 views

What differences are between running a command in shell with and without `bash -c`?

What is the difference of running a command directly in a bash shell, and run it as bash -c <command> in a bash shell? The purpose of my question is that I would like to know how a command is ...
0
votes
0answers
56 views

Compare running a command directly and in background

In Ubuntu, I run date in an interactive bash shell whose pid is 6913, and at the same time, trace the bash shell from another interactive bash shell by strace. By using tracing, I would like to ...
0
votes
0answers
176 views

Use sudo in apache with SELinux

I am using CentOS 6.5. using Apache, I want to use sudo in exec. It works when SELinux stopped. how to configure SELinux to permit it. The php script <?php exec('sudo -u newuser ls /',$output); ...
0
votes
0answers
117 views

SMB/CIFS mount not working with exec() call

To mount CIFS presently I use system() call in source, this works. If I try to run command manually on shell it works too. $ mount -t cifs //IP/dir /mnt -o user=name,pass=PASS,domain=mydomain,nounix ...
0
votes
0answers
242 views

Gnuplot and process-substitution

I have a log file where I need to cut out two values at different positions. these are: time and dQ in my file. The main problem is the paste I think. cause the other utilities work pretty well on ...