Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion erts/emulator/sys/win32/sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -2179,7 +2179,11 @@ fd_start(ErlDrvPort port_num, char* name, SysDriverOpts* opts)
return ERL_DRV_ERROR_GENERAL;
}

dp->in.flags = DF_XLAT_CR;
/* If input is a terminal, we translate \r\n to \n */
if (GetFileType((HANDLE)opts->ifd) == FILE_TYPE_CHAR) {
dp->in.flags = DF_XLAT_CR;
}

if (is_std_error) {
dp->out.flags |= DF_DROP_IF_INVH; /* Just drop messages if stderror
is an invalid handle */
Expand Down
Loading