Debian Codegraph @

ChangeLog

raw
1 1.31 2026-05-24 Todd Rinaldo <[email protected]>
2
3 Bug Fixes:
4 * GH #91, PR #94 - Fix v1.27 regression where _open_tty() always passed
5 O_NOCTTY, preventing make_slave_controlling_terminal() from acquiring
6 a controlling terminal via the POSIX-standard open-without-O_NOCTTY
7 mechanism (it was forced to fall through to an explicit TIOCSCTTY
8 ioctl). _open_tty() now takes an optional noctty flag (default 1 for
9 backward compatibility); make_slave_controlling_terminal() passes 0.
10 * GH #92, PR #93 - Fix openpty() detection on Fedora 33-34 / glibc
11 2.32-2.33 where LTO flags (-flto=auto) caused the libc-only compile
12 probe to falsely succeed, producing "undefined symbol: openpty" at
13 runtime. Try -lutil before libc; harmless on systems where openpty
14 lives in libc (glibc 2.34+, musl) and necessary where it doesn't.
15
16 Maintenance:
17 * PR #90 - Address CPANTS kwalitee issues: add LICENSE, SECURITY.md,
18 and CONTRIBUTING.md; add META `provides` for IO::Tty, IO::Pty, and
19 IO::Tty::Constant; use --format=ustar in TARFLAGS to prevent
20 PaxHeader entries in distribution tarballs.
21 * Clean up MANIFEST.SKIP: add #!include_default so ExtUtils::Manifest's
22 built-in skip list is in effect, drop five entries that duplicate
23 those defaults, and add a ^\.claude/ rule.
24
25 1.29 2026-04-23 Todd Rinaldo <[email protected]>
26
27 Bug Fixes:
28 * GH #87, PR #88 - Fix configure-time function detection probes being
29 broken by compiler optimization. The probes stored function pointers
30 in local variables which -O2/-Os (added to probe flags in PR #81)
31 eliminated as dead stores, so the linker never saw the function
32 reference. On systems where openpty() lives in -lutil (older glibc,
33 BSDs), the probe falsely succeeded without -lutil, producing
34 "undefined symbol: openpty" at runtime. Fixed by storing the
35 function pointer in a file-scope global variable which the optimizer
36 cannot eliminate.
37
38 Maintenance:
39 * PR #89 - Add Ubuntu LTS version matrix (20.04, 22.04, 24.04) to the
40 GitHub Actions test suite. Exercises the system perl on each current
41 Ubuntu LTS release via Docker containers, running after the main
42 ubuntu job.
43
44 1.28 2026-04-23 Todd Rinaldo <[email protected]>
45
46 Bug Fixes:
47 * PR #69 - Fix make_slave_controlling_terminal() on Solaris/HP-UX to use
48 _open_tty() instead of IO::Tty->open(), ensuring STREAMS modules (ptem,
49 ldterm, ttcompat) are pushed via I_PUSH when the slave is opened for
50 controlling terminal setup. Parallel fix to the slave() method fix in
51 1.24.
52 * PR #74 - Fix Perl 5.40+ "Possible memory corruption: ioctl overflowed
53 3rd argument" warning in clone_winsize_from() and get_winsize(). Use
54 pack_winsize(0,0,0,0) to pre-allocate the ioctl buffer with SvCUR
55 matching sizeof(struct winsize) instead of an empty string.
56 * PR #76, PR #79 - Fix diagnostic warnings being silently suppressed when
57 callers use lexical "use warnings" (the modern standard since Perl 5.6).
58 $^W and PL_dowarn only fire under perl -w; replaced with
59 warnings::enabled() in IO::Tty and IO::Pty (PR #76) and ckWARN(WARN_IO)
60 in Tty.xs (PR #79).
61 * PR #77 - Fix file descriptor leak in IO::Pty when new_from_fd() fails
62 after pty_allocate() or _open_tty() returns raw C-level fds. Added
63 POSIX::close() calls on the raw fds before croaking at three sites in
64 new() and slave().
65 * PR #78 - Fix openpty() detection on Alpine Linux and other musl-based
66 systems where openpty() has moved from libutil into libc (glibc 2.34+).
67 Probe libc first before falling back to -lutil.
68 * PR #80 - Fix -Wsign-compare compiler warnings: change namebuflen
69 parameter type from int to size_t in open_slave() and allocate_pty()
70 to match the return type of strlcpy() and the size argument of snprintf().
71 * PR #81 - Fix spurious "_FORTIFY_SOURCE requires compiling with
72 optimization" warnings during configure probes when $Config{optimize}
73 (e.g. -Os) is separate from $Config{ccflags}. Include optimize flags in
74 all configure probe compilations.
75 * PR #84 - Fix header probes in Makefile.PL missing platform extension
76 defines (_GNU_SOURCE, _BSD_VISIBLE, etc.) that function probes already
77 included. Bare #includes could cause HAVE_PTY_H and similar to be unset
78 on strict POSIX systems even when the header exists.
79
80 Improvements:
81 * PR #86 - Use L<> instead of C<> for cross-module POD references in
82 Tty.pm and Pty.pm so MetaCPAN renders IO::Pty, IO::Handle, and IO::Stty
83 as clickable links.
84
85 Maintenance:
86 * PR #70 - Modernize POD in Tty.pm and Pty.pm: remove stale platform
87 version references (FreeBSD 4.4, OpenBSD 2.8, HPUX 10.20, Solaris 2.6),
88 replace defunct SourceForge/mailing list URLs with GitHub issue tracker.
89 * PR #73 - Modernize the try example script: add strict/warnings, my
90 declarations, 3-arg open, and lexical filehandles. The script is shipped
91 to CPAN and referenced in POD as the canonical usage example.
92 * PR #75 - Strengthen test coverage for set_raw() and winsize: verify all
93 termios flags set by cfmakeraw (iflag, oflag, PARENB, CSIZE, CS8, VMIN,
94 VTIME) and add a test for the unpack_winsize() length-validation croak.
95 * PR #85 - Update GitHub Actions to Node.js 24 versions: actions/checkout
96 v6, cross-platform-actions/action v1, perl-actions/install-with-cpm v2.
97 Required before GitHub forces Node.js 24 in June 2026.
98
99 1.27 2026-04-03 Todd Rinaldo <[email protected]>
100
101 Bug Fixes:
102 * GH #68, PR #68 - Fix build on OpenBSD by including termios.h to
103 detect openpty reliably and setting _BSD_SOURCE to find strlcpy
104 in includes. (Alexander Bluhm)
105
106 1.26 2026-04-02 Todd Rinaldo <[email protected]>
107
108 Bug Fixes:
109 * PR #67 - Fix strlcpy detection on DragonFly BSD to avoid
110 static/non-static declaration conflict. Added __DragonFly__ guard
111 to the function test (paralleling __FreeBSD__) and added a
112 belt-and-suspenders check for perl's own HAS_STRLCPY in Tty.xs.
113
114 Maintenance:
115 * PR #66 - Add 5-minute timeout to all CI test steps to prevent
116 hung tests from consuming CI resources indefinitely.
117
118 1.25 2026-04-01 Todd Rinaldo <[email protected]>
119
120 Bug Fixes:
121 * GH #62, PR #64 - Fix IO::Pty DESTROY force-closing the slave pty.
122 The DESTROY method (added in 1.21) explicitly closed the cached
123 slave handle, breaking consumers like IPC::Run that hold a
124 reference to the slave via $pty->slave() and expect it to survive
125 master destruction. Now just deletes the internal reference and
126 lets Perl's refcounting handle fd closure correctly.
127
128 Maintenance:
129 * PR #61 - Simplify version variables to a single source of truth.
130 Extract version from Tty.pm in Makefile.PL using
131 MM->parse_version() instead of hardcoding it, use VERSION_FROM in
132 WriteMakefile, and remove $XS_VERSION from Tty.pm.
133 1.24 2026-03-27 Todd Rinaldo <[email protected]>
134
135 Bug Fixes:
136 * GH #54, PR #55 - Fix slave pty reopening on Solaris/illumos. After
137 close_slave(), reopening with plain Perl open() skipped pushing
138 STREAMS modules (ptem, ldterm, ttcompat), causing isatty() to
139 return false. Added _open_tty() XS function that opens the device
140 and pushes STREAMS modules on platforms that support I_PUSH.
141 * GH #56, PR #58 - Fix undef warnings on Perl 5.8.8 by removing the
142 undef operator on localized $SIG{__DIE__}, and fix XS ttyname() on
143 older Perls by avoiding the InOutStream typemap which can return
144 NULL for filehandles created via new_from_fd.
145 * GH #57, PR #59 - Add __BSD_VISIBLE for FreeBSD in function probes.
146 The _XOPEN_SOURCE definition hid BSD extensions like strlcpy,
147 causing probe failures and subsequent compile errors from
148 conflicting static/non-static declarations.
149
150 Maintenance:
151 * PR #60 - Modernize Makefile.PL: replace BUILD_REQUIRES with
152 TEST_REQUIRES (EUMM 6.64+), add CONFIGURE_REQUIRES, upgrade
153 META_MERGE to meta-spec v2, modernize generated Constant.pm to
154 use 'our' instead of 'use vars', and remove dead PPD postamble.
155
156 1.23 2026-03-24 Todd Rinaldo <[email protected]>
157
158 Bug Fixes:
159 * PR #52 - Replace deprecated indirect object syntax (e.g. `new IO::Pty`)
160 with direct method calls (`IO::Pty->new`). Perl 5.36+ disables indirect
161 object calls, so this fixes forward compatibility.
162
163 Improvements:
164 * PR #53 - Add clone_winsize_from() test coverage (7 new tests) covering
165 basic clone between slave ttys, non-tty master fast path, croak on
166 non-tty source, and pixel dimension preservation.
167
168 Maintenance:
169 * PR #52 - Regenerate README from POD to fix stale version.
170 * PR #53 - Modernize `use vars` to `our` declarations in Tty.pm and
171 Pty.pm. Add missing `use warnings` to Pty.pm.
172 * Add AI_POLICY.md for transparency on AI-assisted contributions.
173 * Convert README to Markdown and update MANIFEST.
174
175 1.22 2026-03-24 Todd Rinaldo <[email protected]>
176
177 Bug Fixes:
178 * GH #47, PR #48 - Fix function detection on Solaris by adding
179 __EXTENSIONS__ to expose BSD extensions (like strlcpy) that are
180 hidden when _XOPEN_SOURCE is defined.
181 * PR #49 - Fix file descriptor leaks in open_slave() error paths.
182 The master pty fd was not closed on several early-return error
183 paths, causing fd leaks when falling through multiple pty
184 allocation methods.
185
186 Improvements:
187 * PR #50 - Add unit tests for ttyname(), slave()/close_slave()
188 lifecycle, set_winsize()/get_winsize() round-trips,
189 pack_winsize/unpack_winsize, and constant importing (28 new tests).
190 * PR #51 - Replace DynaLoader with XSLoader and bump minimum perl
191 version to 5.8.8. XSLoader is simpler and has been in core since
192 perl 5.6.
193
194 Maintenance:
195 * PR #44 - Fix stale POD versions, add Perl 5.38/5.40 to CI, and
196 update repository URLs from toddr/IO-Tty to cpan-authors/IO-Tty.
197 * PR #45 - Remove dead Perl 5.003 compatibility code, modernize XS
198 (Nullch to NULL, perl_get_sv to get_sv, sprintf to snprintf).
199 * PR #46 - Modernize CI with dynamic perl version discovery via
200 perl-actions/perl-versions and add a disttest job.
201
202 1.21 2026-03-22 Todd Rinaldo <[email protected]>
203
204 Bug Fixes:
205 * GH #14, PR #39 - Fix slave fd leak on IO::Pty destruction. The slave
206 pty file descriptor was not closed when the IO::Pty object was
207 destroyed, leaking file descriptors until process exit.
208 * GH #12, PR #40 - Fix set_raw() to modify cflag for proper raw mode
209 on BSD/macOS. set_raw() was not clearing CSIZE|PARENB or setting CS8
210 in cflag, causing incomplete raw mode on macOS, OpenBSD, and NetBSD.
211 * GH #38, PR #41 - Modernize function detection to use proper system
212 headers instead of fragile K&R-style forward declarations. The old
213 approach conflicted with real prototypes on modern compilers
214 (especially FreeBSD/Clang), causing all function checks to fail.
215
216 Improvements:
217 * PR #42 - Add BSD CI testing for FreeBSD, OpenBSD, and NetBSD via
218 cross-platform-actions. Also bumps actions/checkout from v2 to v4.
219
220 1.20 2023-12-28 Todd Rinaldo <[email protected]>
221 * #32 - Skip t/pty_get_winsize.t tests on AIX
222 * #27 - Fix patchlevel check for util.h
223
224 1.19 2023-12-28 Todd Rinaldo <[email protected]>
225 * #37 - Remove --no-undefined from compiler test which is not compatible with all platforms.
226
227 1.18 2023-11-27 Todd Rinaldo <[email protected]>
228 * #35 - Address Freebsd build issue: Make function checks more robust within shared lib
229
230 1.17 2022-11-11 Todd Rinaldo <[email protected]>
231 * Switch changelog entries to metacpan friendly format
232 * #29 - Fix printf format conversion specifiers in croak to support size_t on all platforms
233 * #11,#30 - Tty.pm: pre-allocate buffer for ioctl but leave it length 0
234 * #28 - Use $arg to match @ARGV in Makefile.PL
235
236 1.16 2021-01-2 Todd Rinaldo <[email protected]>
237 * Switch to github for issue tracker.
238 * Switch to testsuite CI workflow.
239 * Tidy
240
241 1.15 2020-10-03 Todd Rinaldo <[email protected]>
242 * Skip winsize test on Solaris and QNX NTO
243 * Make function tests more robust
244 * Work around a header name collission on util.h. This is breaking on recent OSX
245
246 1.15 2020-01-18 Todd Rinaldo <[email protected]>
247 * Add strict/warnings to Tty.pm
248 * Fix pod errors
249 * Typo: s/dependend/dependent/
250 * Prevent spurious warning from get_winsize()
251 * Fix usage of setsid
252 * Github actions testing. Windows is off of course.
253 * Make README.md
254
255 1.13_01 2014-12-14 Todd Rinaldo <[email protected]>
256 * RT 91590 - Remove MAP_TARGET from Makefile.PL
257 * RT 88271 - Fix for Solaris setuid when root running as other user
258
259 1.12 2014-09-12 Todd Rinaldo <[email protected]>
260 * Merge pull request from Chris Williams (bingos) to fix "redefinition of typedef" errors with v5.19.4 and above
261
262 1.11 2014-05-05 Todd Rinaldo <[email protected]>
263 * Release 1.11 to CPAN with explicit dropping of support for Win32 (we never supported it) - RT 77813
264 * Bump version to a devel release 1.11_01 for experimental work.
265 * Fix typo in compilter - RT 75649
266 * Add support for PERL_MM_OPT
267
268 1.10 2010-10-11 Todd Rinaldo <[email protected]>
269 * CPAN testers clean. Bumping to release version 1.10
270
271 1.09_01 2010-10-04 Todd Rinaldo <[email protected]>
272 * RT 60788 - Better error reporting on Operating Systems
273 that can't set a controlling terminal e.g. BeOS
274 * Bump to 1.09_01
275
276 1.09 2010-10-04 Todd Rinaldo <[email protected]>
277 * CPAN testers looks clean. Internal testing done on perl 5.6
278 * Bump version to 1.09 and release to CPAN
279
280 1.08_03 2010-10-02 Todd Rinaldo <[email protected]>
281 * RT 61642 - Fix file number test to work without hang on cygwin
282 * Bump to 1.08_03
283
284 1.08_02 2010-09-10 Todd Rinaldo <[email protected]>
285 * Update all versions to the new version. bump to 1.08_02
286
287 1.08_01 2010-09-10 Todd Rinaldo <[email protected]>
288 * RT 45008 - only try TIOCSCTTY if we don't have a ctty
289 * RT 53883 - IO::Tty detection on BeOS w/fix
290 * RT 60014 - better META.yml by modernizing Makefile.PL
291 * RT 44771 - Add _ to list of escape characters for compiler
292 so it'll compile on windows This is experimental pending a
293 successful dev release
294
295 v1.08 2009-02-05 Roland Giersig <[email protected]>
296 * Makefile.PL, Tty.xs: added support for posix_openpt(), thanks to Ed Schouten for providing a patch
297
298 v1.07 2006-07-18 Roland Giersig <[email protected]>
299 * Tty.xs: added some more letter to BSD allocation
300
301 v1.06 2006-07-15 Roland Giersig <[email protected]>
302 * Tty.pm: pre-allocate buffer for ioctl
303
304 v1.05 2006-06-06 Roland Giersig <[email protected]>
305 * Tty.xs: added includes <sys/pty.h> and <sys/ptyio.h>
306
307 v1.04 2006-05-28 Roland Giersig <[email protected]>
308 * Tty.xs: added handling for z/OS (uses /dev/ptyp0000)
309 * Makefile.PL: added <sys/pty.h> (for HPUX)
310
311 v1.03 2006-04-25 Roland Giersig <[email protected]>
312 * Tty.c: changed newCONSTSUB to use newSV(0) instead of PL_sv_undef, now undef'd constants work
313 * Makefile.PL: made ccflags handling meta-char safe, added ldflags; enhanced error msg
314 * Makefile.PL: added <sys/ptyio.h>
315
316 v1.02 2002-04-02 Roland Giersig <[email protected]>
317 * Tty.pm, Pty.pm: v1.02; disable warning for non-existant die handler
318
319 v1.01 2002-03-18 Roland Giersig <[email protected]>
320 * Makefile.PL: remove cpp, test-compile instead
321 * Tty.pm, Pty.pm: disable die handler when requiring Stty
322
323 v0.97_04 2002-03-06 Roland Giersig <[email protected]>
324 * v0.97_04, final pre-release version
325
326 v0.97_03 2002-03-04 Roland Giersig <[email protected]>
327 * Pty.pm: v0.97_03
328 * Makefile.PL: order of include files is preserved; added test for
329 working cpp.
330 * Tty.pm (clone_winsize_from): v0.97_03; added function.
331 * Tty.xs (allocate_pty): fixed typo in close for _getpty; changed order of termios.h and termio.h includes
332
333 2002-02-26 Roland Giersig <[email protected]>
334
335 * test.pl: replaced Test.pm
336
337 * Tty.pm (set_raw): v0.97_01; moved set_raw() from test to method
338
339 * Tty.xs: got rid of snprintf; don't try openpty() and getpt() if
340 ptsname is not there.
341
342 * Pty.pm: v0.97_01; updated docs
343
344 * Makefile.PL: v0.97_01; auto-create IO::Tty::Constant
345
346 2002-01-31 Roland Giersig <[email protected]>
347
348 * Pty.pm: add IO::Stty to @ISA, master pty is sometimes a tty.
349
350 * Tty.pm: v0.95_01
351
352 2002-01-30 Roland Giersig <[email protected]>
353
354 * Tty.pm, Pty.pm: v0.94_05
355
356 * Tty.xs (allocate_pty): moved getpt() and openpty() before muxes
357
358 * test.pl: if master isatty, set it also to raw; seems to be needed.
359
360 * Makefile.PL: fixed checks; test problematic constants with a compile.
361
362 2002-01-23 Roland Giersig <[email protected]>
363
364 * Tty.pm: v0.94_03
365
366 * test.pl: changed test to probe for maximum chunk the pty can
367 handle; also, the /dev/tty test probes if an EOF is correctly
368 reported from the child to the parent.
369
370 * Tty.xs: finally made debug printfs optional via $IO::Tty::DEBUG.
371
372 2002-01-18 Roland Giersig <[email protected]>
373
374 * Tty.pm: v0.94_02
375
376 * Tty.xs: added #include termio.h
377
378 2002-01-07 Roland Giersig <[email protected]>
379
380 * Pty.pm: adapted to new interface
381 (close_slave): added for keeping open filecount straight
382 (make_slave_controlling_terminal): created anew
383 (slave): reverted from open_slave()
384
385 * Tty.pm: v0.94_01
386
387 * test.pl: adapted to new interface
388
389 * Tty.xs: reverted to opening slave at creation time; added debug
390 printfs
391 (open_slave): use ptsname_r if there, forget about erroneous ttyname.
392 (allocate_pty): added name param on openpty (doesn't take NULL for name)
393
394 2001-11-28 Roland Giersig <[email protected]>
395
396 * Tty.pm: v0.92_04
397
398 * Tty.xs (BOOT): use perl_get_sv for backward compat
399
400 * Makefile.PL: added analysis of configuration
401
402 2001-11-27 Roland Giersig <[email protected]>
403
404 * Tty.pm: v0.92_03
405
406 * Tty.xs (BOOT): removed export_fail, undefined constants are now
407 undef instead of not exportable; added CONFIG variable.
408
409 * Makefile.PL: added setting of CONFIG var
410
411 * test.pl: added printing of CONFIG var
412
413 * Pty.pm (spawn): fixed bug with $^W handling
414
415 2001-11-17 Roland Giersig <[email protected]>
416
417 * Tty.xs (pty_allocate): complete rewrite, based on ideas from
418 openssh and Xemacs. Tries all ways detected by Makefile.PL in
419 order, so in theory it should work everywhere (modulo system
420 quirks). First tries the high-level openpty() before getpt(),
421 then various clone devices and finally BSD-style ptys.
422
423 * Tty.xs (open_slave): moved master init stuff here, must be done
424 before opening the slave. The Stream module pushes are now tried
425 on all systems but only generate warnings on systems that we know
426 need them.
427
428 * Makefile.PL: added tests for all kinds of functions and clone
429 devices.
430
431 2001-11-14 Roland Giersig <[email protected]>
432
433 * Tty.xs (MODULE): stole creation code from openssh
434
435 * test.pl: added test for controlling terminal
436
437 * Pty.pm (spawn): rearranged setsid() and added a fresh open of
438 the slave pty so the pty becomes the controlling terminal for the
439 process.
440
441 2001-10-25 Roland Giersig <[email protected]>
442
443 * Pty.pm (spawn): copied spawning process from Tcl/Expect (thanks,
444 Don!); should set the controlling tty so ssh and other password
445 requesting programs should be OK; also now returns exec errors.
446 (slave_pid): added method to get at PID of spawned process.
447
448 * Makefile.PL: added TIOCCONS.
449
450 * try: adapted to use spawn().
451
452 * test.pl: adapted to use spawn(); added test for exec errors.
453
454 2001-10-16 Roland Giersig <[email protected]>
455
456 * Pty.pm (new): fixed bad my() line
457
458 * automatically add IO::Stty to ISA if it exists.
459
460 2001-07-16 Roland Giersig <[email protected]>
461
462 * test.pl: finally some tests! Spawns a perl mini-script that
463 echoes back all characters from STDIN, but inverted.
464
465 * Pty.pm (slave): slave now is set to be a controlling tty if possible;
466 it also remembers it's name now.
467
468 * Makefile.PL:
469 - on SCO, the slave pts* are in the /dev dir, not /dev/pts
470 - added test for libutil.h, util.h, pty.h and openpty()
471 - added symbol TIOCSCTTY
472
473 * Tty.xs:
474 - some SVR4 only define __SVR4; fixed.
475 - OSF machines need termio.h for various macros
476 - AIX doesn't define VOIDSIG; fixed.
477 - Cygwin can use /dev/ptmx even though that file doesn't exist.
478 - added openpty() version for FreeBSD and others that have
479 no good method for creating ptys; untested.
480
481 * Tty.pm:
482 - moved docu over from Pty.pm to lessen confusion Pty <-> Tty
483 - added verified systems list
484
485 Change 588 on 2000/09/04 by <[email protected]> (Graham Barr)
486
487 Check for /dev/ptmx and /dev/pts instead of testing defined(SVR4)
488
489 Change 587 on 2000/09/04 by <[email protected]> (Graham Barr)
490
491 Make ttyname just warn when it is not implemented instead of croak
492
493 Change 586 on 2000/09/04 by <[email protected]> (Graham Barr)
494
495 Include <sys/modem.h> for HPUX
496
497 Change 585 on 2000/09/04 by <[email protected]> (Graham Barr)
498
499 Makefile.PL
500 - Fix to how cc is called
501
502 Change 461 on 2000/03/29 by <[email protected]> (Graham Barr)
503
504 Release 0.03
505
506 Change 460 on 2000/03/29 by <[email protected]> (Graham Barr)
507
508 General cleanup and added PPD stuff into Makefile.PL
509
510 Change 310 on 1999/05/10 by <[email protected]> (Graham Barr)
511
512 - Removed the need for Configure by implementing a test in Makefile.PL
513 - The existance of constants are now checked at import time, so @EXPORT
514 had to be renamed to @EXPORT_OK. ie noting is imported by default
515
516