summaryrefslogtreecommitdiff
path: root/libraries/base/tests/System/T23399.hs
blob: 4232c94d163ff5577b3f78660e4dc037098f0d10 (plain)
1
2
3
4
5
6
7
8
9
module Main where

import System.Posix.Internals

main = do
  r <- c_getpid
  -- #23399: JS backend wasn't returning a valid JS number as a CPid hence
  -- "read" would fail because the string was "0\0" (not a number, NUL byte)
  print ((read (show r) :: Int) /= -1)