mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
fix(runtime): return number from op_ppid
instead of bigint (#22169)
Fixes #22166
This commit is contained in:
parent
345423cf76
commit
ab8b1b11d7
2 changed files with 3 additions and 1 deletions
|
@ -158,10 +158,12 @@ Deno.test({ permissions: { env: true } }, function envInvalidChars() {
|
||||||
});
|
});
|
||||||
|
|
||||||
Deno.test(function osPid() {
|
Deno.test(function osPid() {
|
||||||
|
assertEquals(typeof Deno.pid, "number");
|
||||||
assert(Deno.pid > 0);
|
assert(Deno.pid > 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
Deno.test(function osPpid() {
|
Deno.test(function osPpid() {
|
||||||
|
assertEquals(typeof Deno.ppid, "number");
|
||||||
assert(Deno.ppid > 0);
|
assert(Deno.ppid > 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ fn op_main_module(state: &mut OpState) -> Result<String, AnyError> {
|
||||||
/// This is an op instead of being done at initialization time because
|
/// This is an op instead of being done at initialization time because
|
||||||
/// it's expensive to retrieve the ppid on Windows.
|
/// it's expensive to retrieve the ppid on Windows.
|
||||||
#[op2(fast)]
|
#[op2(fast)]
|
||||||
#[bigint]
|
#[number]
|
||||||
pub fn op_ppid() -> i64 {
|
pub fn op_ppid() -> i64 {
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue