jonkeane opened a new pull request, #38083:
URL: https://github.com/apache/arrow/pull/38083
### Rationale for this change
A follow on to #38052 which introduced a small bug
### What changes are included in this PR?
Don't ignore the stdout which is the mechanism to tell if under emulation.
### Are these changes tested?
I tested these locally:
On an M2 with emulation:
```
> identical(suppressWarnings(system("sysctl -n sysctl.proc_translated",
intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1")
[1] FALSE
> system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr =
TRUE, ignore.stdout = TRUE)
character(0)
> system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr =
TRUE)
[1] "1"
> identical(suppressWarnings(system("sysctl -n sysctl.proc_translated",
intern = TRUE, ignore.stderr = TRUE)), "1")
[1] TRUE
```
On an M2 without emulation:
```
> identical(suppressWarnings(system("sysctl -n sysctl.proc_translated",
intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1")
[1] FALSE
> system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr =
TRUE, ignore.stdout = TRUE)
character(0)
> system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr =
TRUE)
[1] "0"
> identical(suppressWarnings(system("sysctl -n sysctl.proc_translated",
intern = TRUE, ignore.stderr = TRUE)), "1")
[1] FALSE
```
On an x86 (note the warning message suppression is what #38052 resolved):
```
> identical(suppressWarnings(system("sysctl -n sysctl.proc_translated",
intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1")
[1] FALSE
> system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr =
TRUE, ignore.stdout = TRUE)
character(0)
attr(,"status")
[1] 1
Warning message:
In system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr =
TRUE, :
running command 'sysctl -n sysctl.proc_translated >/dev/null 2>/dev/null'
had status 1
> system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr =
TRUE)
character(0)
attr(,"status")
[1] 1
Warning message:
In system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr =
TRUE) :
running command 'sysctl -n sysctl.proc_translated 2>/dev/null' had status 1
> identical(suppressWarnings(system("sysctl -n sysctl.proc_translated",
intern = TRUE, ignore.stderr = TRUE)), "1")
[1] FALSE
```
### Are there any user-facing changes?
No / the functionality is restored
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]