answersLogoWhite

0


Best Answer

A call to the exec() family of functions in UNIX does not normally return to the calling process. This is because the call replaces the invoking process'es image, thus there is nothing to return to. If an error does occur, exec() returns -1, and sets an error value that can be interrogated, but the answer to the question is, usually, never.

The normal paradigm for launching a process and getting control back, such as by the shell, is to call fork(), which splits the invoking process into two identical processes, one continuing to monitor the other. The other process then calls exec(), replacing itself. When it exits, the first process can detect that and retrieve its return value.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: When does a call to exec return in UNIX?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Computer Science

Which router mode is accessed by entering the enable mode?

privileged EXEC


Explain the difference between user EXEC and privileged EXEC modes?

Privileged mode has access to the entire router or switch configuration. User EXEC mode only has limited options. Specifically, to do any configuration changes, you need to enter privileged mode first.Privileged mode has access to the entire router or switch configuration. User EXEC mode only has limited options. Specifically, to do any configuration changes, you need to enter privileged mode first.Privileged mode has access to the entire router or switch configuration. User EXEC mode only has limited options. Specifically, to do any configuration changes, you need to enter privileged mode first.Privileged mode has access to the entire router or switch configuration. User EXEC mode only has limited options. Specifically, to do any configuration changes, you need to enter privileged mode first.


How do you answer call waiting?

Normally, when a call is waiting, you hear a tone. Then, press the 'flash' button. If the phone does not have a 'flash' button, tap the 'hangup' button quickly (not on a cordless phone). Do the same to return to your original call.


Was Bill Gates a hacker?

Yes, him and three other students at MIT use to hack Unix systems alot.One of those Unix Hacks ended up being MSDOS


List all system call interface?

The system call interface defines all the services of the operating system to the programs. The basis of the different variants of the UNIX operating system is different system call interface. SVID (System V interface definitions ) POSIX standard (IEEE) POSIX 1003.4 is API (Application Program Interface) for the real time systems. www.etherlook.com

Related questions

What is exec system call of UNIX operating system?

The exec family of UNIX system calls will overlay the current process with another process. It can be used to "chain" a series of programs to run together. When used with the "fork" system call it allows multi-tasking to occur.


What is use of -exec in find command of unix?

The -exec option executes the following command on a target of the 'find' command.


Why Mac OS 10.3.9 have exec functions of Unix-like operating systems?

The reason for the exec functions being same/similar is because the Mac OS has its roots in variants of the Unix kernel.


What system calls have to be executed by a command interpreter or shell in order to start a new process?

In Unix systems, a fork system call followed by an exec systemcall need to be performed to start a new process. The fork call clones thecurrently executing process, while the exec call overlays a new processbased on a different executable over the calling process.


Function gets returns?

Yes, it does return. There are only few functions that do not return, like exit, exec, longjmp.


What does the size command return in Unix?

du -sk "filename"


Types of system call in process management?

fork, exec, wait, exit


What is execlp?

execlp() is a system call on UNIX systems (within the "exec" family of system calls declared in unistd.h) that loads an executable and begins executing it within the current process. execlp() is unique from other "exec" calls in that PATH environment variable is searched (so you need not provide the full path of the executable) and the command line arguments are passed in using variable size argument list (... in C) as opposed to an array of arguments.


What is the difference between execl and system in unix?

The 'system' API will run a command string in a subshell and return to the calling program. The 'execl' API will overlay the current process with a different program; it can never return to the calling program because the calling program is no longer there (it has been overlayed by the new program from execl). The fork and exec command are used to spawn other activities or processes from a currently running program.


What is cu in unix?

'cu' stands for Call Unix. It used to be used for calling dialup services from one Unix to another. Hardly used anymore with networks (which are much faster)


How do you call an exe file in c source code?

system, exec*, spawn*, CreateProcess, ShellExecute...


What should you do if your brother-in-law is acting as your mother's exec but he was never qualified to be such and your father was but he passed away and his exec won't return your calls or letters?

That seems like a good reason to get a lawyer. How big do you think the estate is? If there isn't much, it might not be worth it.