Skip to content

Commit 80ed614

Browse files
authored
Bulk Fix CRT Acrolinx issues 12 of N (#4598)
1 parent f41c469 commit 80ed614

30 files changed

+130
-112
lines changed

docs/c-runtime-library/reference/execve-wexecve.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,31 @@ Array of pointers to environment settings.
4545

4646
## Return Value
4747

48-
If successful, these functions do not return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set.
48+
If successful, these functions don't return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set.
4949

5050
|**errno** value|Description|
5151
|-------------------|-----------------|
5252
|**E2BIG**|The space required for the arguments and environment settings exceeds 32 KB.|
5353
|**EACCES**|The specified file has a locking or sharing violation.|
5454
|**EINVAL**|Invalid parameter.|
55-
|**EMFILE**|Too many files open (the specified file must be opened to determine whether it is executable).|
55+
|**EMFILE**|Too many files open (the specified file must be opened to determine whether it's executable).|
5656
|**ENOENT**|The file or path not found.|
57-
|**ENOEXEC**|The specified file is not executable or has an invalid executable-file format.|
58-
|**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, indicating that the calling process was not allocated properly.|
57+
|**ENOEXEC**|The specified file isn't executable or has an invalid executable-file format.|
58+
|**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, indicating that the calling process wasn't allocated properly.|
5959

6060
For more information about these and other return codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
6161

6262
## Remarks
6363

6464
Each of these functions loads and executes a new process, passing an array of pointers to command-line arguments and an array of pointers to environment settings.
6565

66-
**_execve** and **_wexecve** validate their parameters. If *cmdname* is a null pointer, or if *argv* is a null pointer, pointer to an empty array, or if the array contains an empty string as the first argument, these functions invoke the invalid parameter handler as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EINVAL** and return -1. No process is launched.
66+
**_execve** and **_wexecve** validate their parameters. These functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), when:
67+
68+
- *cmdname* is a null pointer,
69+
- *argv* is either a null pointer or pointer to an empty array,
70+
- the array contains an empty string as the first argument.
71+
72+
If execution is allowed to continue by the handler, these functions set **errno** to **EINVAL**, and return -1. No process is launched.
6773

6874
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
6975

docs/c-runtime-library/reference/execvp-wexecvp.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,31 @@ Array of pointers to parameters.
4040

4141
## Return Value
4242

43-
If successful, these functions do not return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set.
43+
If successful, these functions don't return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set.
4444

4545
|**errno** value|Description|
4646
|-------------------|-----------------|
4747
|**E2BIG**|The space required for the arguments and environment settings exceeds 32 KB.|
4848
|**EACCES**|The specified file has a locking or sharing violation.|
4949
|**EINVAL**|Invalid parameter.|
50-
|**EMFILE**|Too many files open (the specified file must be opened to determine whether it is executable).|
50+
|**EMFILE**|Too many files open (the specified file must be opened to determine whether it's executable).|
5151
|**ENOENT**|The file or path not found.|
52-
|**ENOEXEC**|The specified file is not executable or has an invalid executable-file format.|
53-
|**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, indicating that the calling process was not allocated properly.|
52+
|**ENOEXEC**|The specified file isn't executable or has an invalid executable-file format.|
53+
|**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, indicating that the calling process wasn't allocated properly.|
5454

5555
For more information about these and other return codes, see [_doserrno, errno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
5656

5757
## Remarks
5858

5959
Each of these functions loads and executes a new process, passing an array of pointers to command-line arguments and using the **PATH** environment variable to find the file to execute.
6060

61-
The **_execvp** functions validate their parameters. If the *cmdname* is a null pointer, or *argv* is a null pointer, pointer to an empty array, or if the array contains an empty string as the first argument, these functions invoke the invalid parameter handler as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EINVAL** and return -1. No process is launched.
61+
The **_execvp** functions validate their parameters. These functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), when:
62+
63+
- *cmdname* is a null pointer,
64+
- *argv* is either a null pointer or pointer to an empty array,
65+
- the array contains an empty string as the first argument.
66+
67+
If execution is allowed to continue by the handler, these functions set **errno** to **EINVAL**, and return -1. No process is launched.
6268

6369
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
6470

docs/c-runtime-library/reference/execvpe-wexecvpe.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,30 @@ Array of pointers to environment settings.
4545

4646
## Return Value
4747

48-
If successful, these functions do not return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set.
48+
If successful, these functions don't return to the calling process. A return value of -1 indicates an error, in which case the **errno** global variable is set.
4949

5050
|**errno** value|Description|
5151
|-------------------|-----------------|
5252
|**E2BIG**|The space that's required for the arguments and environment settings exceeds 32 KB.|
5353
|**EACCES**|The specified file has a locking or sharing violation.|
54-
|**EMFILE**|Too many files are open. (The specified file must be opened to determine whether it is executable.)|
55-
|**ENOENT**|The file or path is not found.|
56-
|**ENOEXEC**|The specified file is not executable or has an invalid executable-file format.|
57-
|**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, which indicates that the calling process was not allocated correctly.|
54+
|**EMFILE**|Too many files are open. (The specified file must be opened to determine whether it's executable.)|
55+
|**ENOENT**|The file or path isn't found.|
56+
|**ENOEXEC**|The specified file isn't executable or has an invalid executable-file format.|
57+
|**ENOMEM**|Not enough memory is available to execute the new process; the available memory has been corrupted; or an invalid block exists, which indicates that the calling process wasn't allocated correctly.|
5858

5959
For more information about these and other return codes, see [errno, _doserrno, _sys_errlist, and _sys_nerr](../../c-runtime-library/errno-doserrno-sys-errlist-and-sys-nerr.md).
6060

6161
## Remarks
6262

6363
Each of these functions loads and executes a new process, and passes an array of pointers to command-line arguments and an array of pointers to environment settings. These functions use the **PATH** environment variable to find the file to execute.
6464

65-
The **_execvpe** functions validate their parameters. If the *cmdname* is a null pointer, or if *argv* is a null pointer, a pointer to an empty array, or a pointer to an array that contains an empty string as the first argument, these functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md). If execution is allowed to continue, these functions set **errno** to **EINVAL** and return -1. No process is launched.
65+
The **_execvpe** functions validate their parameters. These functions invoke the invalid parameter handler, as described in [Parameter Validation](../../c-runtime-library/parameter-validation.md), when:
66+
67+
- *cmdname* is a null pointer,
68+
- *argv* is either a null pointer or pointer to an empty array,
69+
- the array contains an empty string as the first argument.
70+
71+
If execution is allowed to continue by the handler, these functions set **errno** to **EINVAL**, and return -1. No process is launched.
6672

6773
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
6874

docs/c-runtime-library/reference/exit-exit-exit.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Exit status code.
3939

4040
The **`exit`**, **`_Exit`** and **`_exit`** functions terminate the calling process. The **`exit`** function calls destructors for thread-local objects, then calls—in last-in-first-out (LIFO) order—the functions that are registered by **`atexit`** and **`_onexit`**, and then flushes all file buffers before it terminates the process. The **`_Exit`** and **`_exit`** functions terminate the process without destroying thread-local objects or processing **`atexit`** or **`_onexit`** functions, and without flushing stream buffers.
4141

42-
Although the **`exit`**, **`_Exit`** and **`_exit`** calls do not return a value, the value in *`status`* is made available to the host environment or waiting calling process, if one exists, after the process exits. Typically, the caller sets the *`status`* value to 0 to indicate a normal exit, or to some other value to indicate an error. The *`status`* value is available to the operating-system batch command **`ERRORLEVEL`** and is represented by one of two constants: **`EXIT_SUCCESS`**, which represents a value of 0, or **`EXIT_FAILURE`**, which represents a value of 1.
42+
Although the **`exit`**, **`_Exit`** and **`_exit`** calls don't return a value, the value in *`status`* is made available to the host environment or waiting calling process, if one exists, after the process exits. Typically, the caller sets the *`status`* value to 0 to indicate a normal exit, or to some other value to indicate an error. The *`status`* value is available to the operating-system batch command **`ERRORLEVEL`** and is represented by one of two constants: **`EXIT_SUCCESS`**, which represents a value of 0, or **`EXIT_FAILURE`**, which represents a value of 1.
4343

4444
The **`exit`**, **`_Exit`**, **`_exit`**, **`quick_exit`**, **`_cexit`**, and **`_c_exit`** functions behave as follows.
4545

@@ -49,10 +49,10 @@ The **`exit`**, **`_Exit`**, **`_exit`**, **`quick_exit`**, **`_cexit`**, and **
4949
|**`_Exit`**|Performs minimal C library termination procedures, terminates the process, and provides the supplied status code to the host environment.|
5050
|**`_exit`**|Performs minimal C library termination procedures, terminates the process, and provides the supplied status code to the host environment.|
5151
|**`quick_exit`**|Performs quick C library termination procedures, terminates the process, and provides the supplied status code to the host environment.|
52-
|**`_cexit`**|Performs complete C library termination procedures and returns to the caller. Does not terminate the process.|
53-
|**`_c_exit`**|Performs minimal C library termination procedures and returns to the caller. Does not terminate the process.|
52+
|**`_cexit`**|Performs complete C library termination procedures and returns to the caller. Doesn't terminate the process.|
53+
|**`_c_exit`**|Performs minimal C library termination procedures and returns to the caller. Doesn't terminate the process.|
5454

55-
When you call the **`exit`**, **`_Exit`** or **`_exit`** function, the destructors for any temporary or automatic objects that exist at the time of the call are not called. An automatic object is a non-static local object defined in a function. A temporary object is an object that's created by the compiler, such as a value returned by a function call. To destroy an automatic object before you call **`exit`**, **`_Exit`**, or **`_exit`**, explicitly call the destructor for the object, as shown here:
55+
When you call the **`exit`**, **`_Exit`** or **`_exit`** function, the destructors for any temporary or automatic objects that exist at the time of the call aren't called. An automatic object is a non-static local object defined in a function. A temporary object is an object that's created by the compiler, such as a value returned by a function call. To destroy an automatic object before you call **`exit`**, **`_Exit`**, or **`_exit`**, explicitly call the destructor for the object, as shown here:
5656

5757
```cpp
5858
void last_fn() {}
@@ -63,7 +63,7 @@ void last_fn() {}
6363
}
6464
```
6565
66-
Do not use **`DLL_PROCESS_ATTACH`** to call **`exit`** from **`DllMain`**. To exit the **`DLLMain`** function, return **`FALSE`** from **`DLL_PROCESS_ATTACH`**.
66+
Don't use **`DLL_PROCESS_ATTACH`** to call **`exit`** from **`DllMain`**. To exit the **`DLLMain`** function, return **`FALSE`** from **`DLL_PROCESS_ATTACH`**.
6767
6868
By default, this function's global state is scoped to the application. To change this behavior, see [Global state in the CRT](../global-state.md).
6969

docs/c-runtime-library/reference/exp2-exp2f-exp2l.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ For more compatibility information, see [Compatibility](../../c-runtime-library/
7979
## See also
8080
8181
[Alphabetical Function Reference](crt-alphabetical-function-reference.md)<br/>
82-
[exp, expf, expl](exp-expf.md)<br/>
83-
[log2, log2f, log2l](log2-log2f-log2l.md)<br/>
82+
[`exp`, `expf`, `expl`](exp-expf.md)<br/>
83+
[`log2`, `log2f`, `log2l`](log2-log2f-log2l.md)

0 commit comments

Comments
 (0)