zsh-workers
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <psprint@zdharma.org>
To: tetsujin@scope-eye.net, zsh-workers@zsh.org
Subject: Re: Building a new ZSH module outside the ZSH source tree
Date: Thu, 25 May 2017 15:00:19 +0200	[thread overview]
Message-ID: <etPan.5926d563.515f007c.1a9@MacMini.local> (raw)
In-Reply-To: <8b3ca9a21415fa118f593dcc189bb5e04e64e75d@webmail.scope-eye.net>

On 25 maja 2017 at 00:41:41, tetsujin@scope-eye.net (tetsujin@scope-eye.net) wrote:
> Perhaps the best answer is to call into the script from my module's
> build system, and then use the Makefile it generates. Perhaps that
> could even work without having to place my module in a subdirectory of
> the shell's build tree? (Not sure about that one.)

I think it will work, all is needed is what is automatically generated from .c files – functions marked with /**/ are exported, etc. I didn't do this, have this in back of my head, currently I focus on the body of the topic – the actual modules – having the Zsh's configure script handling things for me.

One thing: from Zsh 5.2 there was introduced addmodulefd() call. Created file descriptors should be registered with it. So module will need #ifdefs disabling this call to properly load on zsh-5.0.8 or similar. I think what the addmodulefd() does isn't actually or fully used within shell, the fd-management still actually relies on dup, dup2 knowing which FDs are taken and which are free. Am I right, could someone clarify?

I'm looking for a way to disable addmodule fd call, either at compile time (would have to guess that user has zsh < 5.2, or use --disable-addfd configure option), or at run-time.

-- 
Sebastian Gniazdowski
psprint /at/ zdharma.org


  reply	other threads:[~2017-05-25 13:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-24 18:57 tetsujin
2017-05-24 21:19 ` Bart Schaefer
2017-05-24 22:41   ` tetsujin
2017-05-25 13:00     ` Sebastian Gniazdowski [this message]
2017-05-26  5:54       ` George

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=etPan.5926d563.515f007c.1a9@MacMini.local \
    --to=psprint@zdharma.org \
    --cc=tetsujin@scope-eye.net \
    --cc=zsh-workers@zsh.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 public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).