]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sed: Fix -i option behavior with 'q' command.
authormarkj <markj@FreeBSD.org>
Wed, 29 Aug 2018 17:09:03 +0000 (17:09 +0000)
committermarkj <markj@FreeBSD.org>
Wed, 29 Aug 2018 17:09:03 +0000 (17:09 +0000)
commitf601b777fc57db57df87abab50d07e1c4f01374c
tree009bbaf807a214a0b2475d23f282025dade9d96f
parent208aeda4b2e009825976055208e4e8b090ae2c20
sed: Fix -i option behavior with 'q' command.

Don't just exit when encountering the 'q' command if we edit file
inplace, and give mf_fgets() a chance to actually handle the
inplace case.

Also add a regression test.

Submitted by: Yuri Pankov <yuripv@yuripv.net>
Approved by: re (kib)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D16798
usr.bin/sed/extern.h
usr.bin/sed/main.c
usr.bin/sed/process.c
usr.bin/sed/tests/sed2_test.sh