| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: sh.1,v 1.116 2016/01/05 18:16:20 christos Exp $ | | 1 | .\" $NetBSD: sh.1,v 1.117 2016/01/06 00:22:21 wiz Exp $ |
2 | .\" Copyright (c) 1991, 1993 | | 2 | .\" Copyright (c) 1991, 1993 |
3 | .\" The Regents of the University of California. All rights reserved. | | 3 | .\" The Regents of the University of California. All rights reserved. |
4 | .\" | | 4 | .\" |
5 | .\" This code is derived from software contributed to Berkeley by | | 5 | .\" This code is derived from software contributed to Berkeley by |
6 | .\" Kenneth Almquist. | | 6 | .\" Kenneth Almquist. |
7 | .\" | | 7 | .\" |
8 | .\" Redistribution and use in source and binary forms, with or without | | 8 | .\" Redistribution and use in source and binary forms, with or without |
9 | .\" modification, are permitted provided that the following conditions | | 9 | .\" modification, are permitted provided that the following conditions |
10 | .\" are met: | | 10 | .\" are met: |
11 | .\" 1. Redistributions of source code must retain the above copyright | | 11 | .\" 1. Redistributions of source code must retain the above copyright |
12 | .\" notice, this list of conditions and the following disclaimer. | | 12 | .\" notice, this list of conditions and the following disclaimer. |
13 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 13 | .\" 2. Redistributions in binary form must reproduce the above copyright |
14 | .\" notice, this list of conditions and the following disclaimer in the | | 14 | .\" notice, this list of conditions and the following disclaimer in the |
| @@ -1322,27 +1322,27 @@ mechanism was used or because a symbolic | | | @@ -1322,27 +1322,27 @@ mechanism was used or because a symbolic |
1322 | .It eval Ar string ... | | 1322 | .It eval Ar string ... |
1323 | Concatenate all the arguments with spaces. | | 1323 | Concatenate all the arguments with spaces. |
1324 | Then re-parse and execute the command. | | 1324 | Then re-parse and execute the command. |
1325 | .It exec Op Ar command arg ... | | 1325 | .It exec Op Ar command arg ... |
1326 | Unless command is omitted, the shell process is replaced with the | | 1326 | Unless command is omitted, the shell process is replaced with the |
1327 | specified program (which must be a real program, not a shell built-in or | | 1327 | specified program (which must be a real program, not a shell built-in or |
1328 | function). | | 1328 | function). |
1329 | Any redirections on the | | 1329 | Any redirections on the |
1330 | .Ic exec | | 1330 | .Ic exec |
1331 | command are marked as permanent, so that they are not undone when the | | 1331 | command are marked as permanent, so that they are not undone when the |
1332 | .Ic exec | | 1332 | .Ic exec |
1333 | command finishes. | | 1333 | command finishes. |
1334 | File descriptors created via such redirections are marked close-on-exec | | 1334 | File descriptors created via such redirections are marked close-on-exec |
1335 | (see | | 1335 | (see |
1336 | .Xr open 2 | | 1336 | .Xr open 2 |
1337 | .Dv O_CLOEXEC | | 1337 | .Dv O_CLOEXEC |
1338 | or | | 1338 | or |
1339 | .Xr fcntl 2 | | 1339 | .Xr fcntl 2 |
1340 | .Dv F_SETFD / | | 1340 | .Dv F_SETFD / |
1341 | .Dv FD_CLOEXEC ) , | | 1341 | .Dv FD_CLOEXEC ) , |
1342 | unless the descriptors they point to refer to the standard input, | | 1342 | unless the descriptors they point to refer to the standard input, |
1343 | output, or error (file descriptors 0, 1, 2). | | 1343 | output, or error (file descriptors 0, 1, 2). |
1344 | Traditionally Bourne-like shells | | 1344 | Traditionally Bourne-like shells |
1345 | (except | | 1345 | (except |
1346 | .Xr ksh 1 ) , | | 1346 | .Xr ksh 1 ) , |
1347 | made those file descriptors available to exec'ed processes. | | 1347 | made those file descriptors available to exec'ed processes. |
1348 | .It exit Op Ar exitstatus | | 1348 | .It exit Op Ar exitstatus |