Page MenuHomeFreeBSD

ttymsg: Create ttymsgat()
AbandonedPublic

Authored by jfree on Aug 9 2023, 8:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 18, 10:40 AM
Unknown Object (File)
Fri, Oct 18, 9:51 AM
Unknown Object (File)
Oct 5 2024, 3:30 AM
Unknown Object (File)
Oct 4 2024, 6:48 PM
Unknown Object (File)
Oct 4 2024, 6:38 PM
Unknown Object (File)
Oct 2 2024, 1:25 AM
Unknown Object (File)
Oct 1 2024, 4:44 AM
Unknown Object (File)
Sep 30 2024, 2: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