16777215 looks remarkably like '-1' shifted right eight bits. (In two's complement notation (I think that the term I want).) What we have is "shift the argument to the right and fill in the vacated bits with the sign bit". A physical shift rather than a logical shift, at the hardware level.
Someone is trying to tell you that something in your backgrounding of the process is going awry. Perhaps a difference in ENV variables between fore- and back-ground. (At a guess.)
----
I Go Back to Sleep, Now.
OGB