You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Due to [platform-specific behavior], the exit code for this example will be
/// `0` on Linux, but `256` on Windows:
///
/// ```no_run
/// use std::process;
///
/// process::exit(0x0f00);
/// ```
However from the text above, line process::exit(0x0f00); should be changed to process::exit(0x0100); . On Windows, all 32 bits of the exit code is available. See the document of ExitProcess() for more details. (The parameter of ExitProcess() is a UINT, which maps to a C unsigned int on Windows platforms, which usually is a 32-bit unsigned integer today. The 32-bit 0x0f00 is 3840, not 256.)
The text was updated successfully, but these errors were encountered:
The document said:
However from the text above, line
process::exit(0x0f00);
should be changed toprocess::exit(0x0100);
. On Windows, all 32 bits of the exit code is available. See the document ofExitProcess()
for more details. (The parameter ofExitProcess()
is aUINT
, which maps to a Cunsigned int
on Windows platforms, which usually is a 32-bit unsigned integer today. The 32-bit 0x0f00 is 3840, not 256.)The text was updated successfully, but these errors were encountered: