summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2026-06-11 06:34:30 +0200
committerMikael Magnusson <mikachu@gmail.com>2026-06-14 01:57:17 +0200
commit807eac8dff2b2281ac7cf52ebd8c7b73fa358e37 (patch)
tree858330ac32855f43f046c320b175ab63e691fec8
parent54751: make the W02 test not take a full minute on linux (diff)
downloadzsh-807eac8dff2b2281ac7cf52ebd8c7b73fa358e37.tar
zsh-807eac8dff2b2281ac7cf52ebd8c7b73fa358e37.tar.gz
zsh-807eac8dff2b2281ac7cf52ebd8c7b73fa358e37.tar.bz2
zsh-807eac8dff2b2281ac7cf52ebd8c7b73fa358e37.tar.lz
zsh-807eac8dff2b2281ac7cf52ebd8c7b73fa358e37.tar.xz
zsh-807eac8dff2b2281ac7cf52ebd8c7b73fa358e37.tar.zst
zsh-807eac8dff2b2281ac7cf52ebd8c7b73fa358e37.zip
54753: zpty: register pty fd as FDT_MODULE so it isn't closed when forking
This lets us remove these mysterious braces too.
-rw-r--r--ChangeLog3
-rw-r--r--Src/Modules/zpty.c3
-rw-r--r--Test/W02jobs.ztst3
3 files changed, 5 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a8878ce34..c00d524d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2026-06-14 Mikael Magnusson <mikachu@gmail.com>
+ * 54753: Src/Modules/zpty.c, Test/W02jobs.ztst: zpty: register
+ pty fd as FDT_MODULE so it isn't closed when forking
+
* 54751: Test/W02jobs.ztst: make the W02 test not take a full
minute on linux
diff --git a/Src/Modules/zpty.c b/Src/Modules/zpty.c
index 5f3a8f24e..6e201e76b 100644
--- a/Src/Modules/zpty.c
+++ b/Src/Modules/zpty.c
@@ -447,9 +447,8 @@ newptycmd(char *nam, char *pname, char **args, int echo, int nblock)
return 1;
}
}
-#else
- addmodulefd(master, FDT_INTERNAL);
#endif
+ addmodulefd(master, FDT_MODULE);
p = (Ptycmd) zalloc(sizeof(*p));
diff --git a/Test/W02jobs.ztst b/Test/W02jobs.ztst
index d92885364..bfbb02f7b 100644
--- a/Test/W02jobs.ztst
+++ b/Test/W02jobs.ztst
@@ -23,8 +23,7 @@
zpty_stop() {
# exit twice in case of check_jobs
zpty -w zsh $'exit\nexit\n'
- # zpty gives no output when piped without these braces (?)
- { zpty -r zsh } | sed $'/[^[:space:]]/!d; s/\r$//;'
+ zpty -r zsh | sed $'/[^[:space:]]/!d; s/\r$//;'
zpty -d
:
}