all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andrew Pennebaker <andrew.pennebaker@gmail.com>
To: Emanuel Berg <embe8573@student.uu.se>
Cc: Emacs Help <help-gnu-emacs@gnu.org>
Subject: Re: Feature request: Expose system `exec` as a built-in elisp function
Date: Wed, 13 Aug 2014 13:48:44 -0500	[thread overview]
Message-ID: <CAHXt_SV0ryRK8yuvAPykY8ktb32Zn_DOm4b2HMc9pE59SxLbgQ@mail.gmail.com> (raw)
In-Reply-To: <87mwb8tej5.fsf@debian.uxu>

One example of the worthiness of exec is cask, an Emacs package manager
that sometimes wants to fork out to an emacs instance, for editing text
files.


On Wed, Aug 13, 2014 at 1:45 PM, Emanuel Berg <embe8573@student.uu.se>
wrote:

> Andrew Pennebaker <andrew.pennebaker@gmail.com> writes:
>
> > That's what I thought, at first. exec has the
> > additional semantic that it replaces the current
> > process with the system call, so it's more efficient
> > for certain tasks.
>
> Yes, exec (man "exec") does this. It accepts an
> argument for what program to execute, and then a list
> of arguments (the argv) to be inputed that program.
>
> It is usually used with fork. One process devides itself
> with fork(), which returns twice (magic!), and from the
> return values the child process can be identified;
> then, the child uses exec to fill itself with software
> so it can do something productive.
>
> So as for this method and setting (which may be
> different from yours) it is not a matter of efficiency,
> it is rather that without exec, often there isn't
> anything for the child to do. (You probably already
> know all this.)
>
> So if you want to replace the current process, can't
> you just have the current process execute whatever code
> you had in mind for exec?
>
> --
> underground experts united
>



-- 
Cheers,

Andrew Pennebaker
www.yellosoft.us


  reply	other threads:[~2014-08-13 18:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.7022.1407855404.1147.help-gnu-emacs@gnu.org>
2014-08-13 15:29 ` Feature request: Expose system `exec` as a built-in elisp function Barry Margolin
2014-08-13 17:52   ` Andrew Pennebaker
     [not found]   ` <mailman.7066.1407952350.1147.help-gnu-emacs@gnu.org>
2014-08-13 18:45     ` Emanuel Berg
2014-08-13 18:48       ` Andrew Pennebaker [this message]
     [not found]       ` <mailman.7068.1407955728.1147.help-gnu-emacs@gnu.org>
2014-08-13 19:22         ` Emanuel Berg
2014-08-13 20:36         ` Barry Margolin
2014-08-13 21:42           ` Andrew Pennebaker
2014-08-14  6:08             ` Kevin Rodgers
     [not found]           ` <mailman.7080.1407966184.1147.help-gnu-emacs@gnu.org>
2014-08-13 22:16             ` Emanuel Berg
2014-08-13 22:50               ` Andrew Pennebaker
2014-08-14  9:23             ` Barry Margolin
2014-08-14 21:15               ` Emanuel Berg
2014-08-13 13:44 Andrew Pennebaker
2014-08-13 15:57 ` Stefan Monnier
2014-08-13 18:27 ` Glenn Morris
  -- strict thread matches above, loose matches on Subject: below --
2014-08-12 14:56 Andrew Pennebaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHXt_SV0ryRK8yuvAPykY8ktb32Zn_DOm4b2HMc9pE59SxLbgQ@mail.gmail.com \
    --to=andrew.pennebaker@gmail.com \
    --cc=embe8573@student.uu.se \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.