Page MenuHomeFreeBSD

ttymsg: Create ttymsgat()
AbandonedPublic

Authored by jfree on Aug 9 2023, 8:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 6 2024, 7:48 PM
Unknown Object (File)
Dec 29 2023, 3:55 AM
Unknown Object (File)
Dec 20 2023, 8:05 AM
Unknown Object (File)
Nov 6 2023, 5:50 AM
Unknown Object (File)
Sep 18 2023, 4:42 AM
Unknown Object (File)
Sep 15 2023, 1:37 AM
Unknown Object (File)
Aug 10 2023, 12:58 AM
Subscribers

Details

Reviewers
markj
Summary
Unlike ttymsg(), ttymsgat() does not attempt to open a device. It will
send its message to the device represented by the by the fd argument.

The ttymsg() function now opens the provided device and passes it into
ttymsgat() for processing.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

jfree requested review of this revision.Aug 9 2023, 8:29 PM
markj added inline comments.
usr.bin/wall/ttymsg.c
76

Please try to avoid mixing style changes with functional ones.

109

You might also check that the fd is non-blocking, since this code assumes that it is. fcntl(fd, F_GETFL) should tell you.

This revision is now accepted and ready to land.Aug 9 2023, 8:47 PM
  • Remove style(9) changes
  • Check for blocking fd
This revision now requires review to proceed.Aug 9 2023, 9:07 PM
markj added inline comments.
usr.bin/wall/ttymsg.c
176

There's no real purpose in closing an fd right before exiting, I wouldn't bother with it.

This revision is now accepted and ready to land.Aug 9 2023, 9:15 PM