truncate: do not die when a file doesn't exist and no-create flag is on
authorAri Sundholm <ari@tuxera.com>
Mon, 25 May 2015 13:16:11 +0000 (15:16 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Mon, 25 May 2015 13:17:03 +0000 (15:17 +0200)
commitfc3e40ee8102c8b17fc98fbc93417bed4d878723
treec81cf708a85dab603f85626988585a8b833d76aa
parent7f4a49a96c4e6626f01a09a801d79c591ad0b1db
truncate: do not die when a file doesn't exist and no-create flag is on

Additionally, open(2) failures do not make the program die immediately.
This makes the behavior of the program match coreutils more closely.

function                                             old     new   delta
truncate_main                                        161     221     +60

Signed-off-by: Ari Sundholm <ari@tuxera.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/truncate.c