Ignore:
Timestamp:
Mar 31, 2018, 12:30:15 AM (7 years ago)
Author:
bird
Message:

kmkbuiltin: Added KMK_OPEN_NO_INHERIT to all open calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/mv.c

    r3215 r3219  
    374374        acl_t acl;
    375375
    376         if ((from_fd = open(from, O_RDONLY, 0)) < 0) {
     376        if ((from_fd = open(from, O_RDONLY | KMK_OPEN_NO_INHERIT, 0)) < 0) {
    377377                warn("%s", from);
    378378                return (1);
     
    389389        }
    390390        while ((to_fd =
    391             open(to, O_CREAT | O_EXCL | O_TRUNC | O_WRONLY, 0)) < 0) {
     391            open(to, O_CREAT | O_EXCL | O_TRUNC | O_WRONLY | KMK_OPEN_NO_INHERIT, 0)) < 0) {
    392392                if (errno == EEXIST && unlink(to) == 0)
    393393                        continue;
Note: See TracChangeset for help on using the changeset viewer.