Re: exit code running out the shell question

[email protected] (ToddAndMargo via perl6-users) Thu, 6 Nov 2025 02:16:49 -0800
Newsgroups perl.perl6.users
Message-ID <[email protected]>
On 11/6/25 1:42 AM, Peter Pentchev wrote:
> On Wed, Nov 05, 2025 at 09:40:51PM -0800, ToddAndMargo via perl6-users wrote:
>> On 11/5/25 9:32 PM, ToddAndMargo via perl6-users wrote:
>>> Hi All,
>>>
>>> Why would a Raku program return an exit code of
>>> -1073741510 (3221225786)?
>>>
>>> Yours in Confusion,
>>> -T
>>
>> This is happening to me in Windows 10
>>
>> Search.brave.com's AI states this:
>> https://search.brave.com/search?q=why+would+a+raku+return+an+exit+code+of+-1073741510&spellcheck=0&source=alteredQuery&summary=1&conversation=d94c64bece8d47d076d8ea
>>
>>    The exit code -1073741510 (0xc000013a) is a Windows-specific
>>    error code that indicates an application was terminated
>>    abruptly during a logoff or shutdown sequence. This error
>>    is not directly related to Raku itself but can occur if
>>    a Raku program is running as part of a larger application
>>    or service that is terminated unexpectedly, such as when
>>    the system shuts down too quickly for the process to exit
>>    gracefully. The error typically arises when the operating
>>    system does not allow sufficient time for the application
>>    to close properly, which can happen during a Windows logoff
>>    or shutdown.
>>
>>
>> When I run my program manually, it exits perfectly.
>>
>> Since this runs unattended, how it the world do
>> I trace this down?  Log every subroutine that is
>> called? Is there a tracing module that will do
>> this for me?
> 
> This is not an error in your program itself. Your program would
> probably run fine, but it just happened to be invoked at
> exactly the wrong time: when something else tried to shut
> the Windows computer down or reboot it.
> 
> This is not something you have control over, unless it was your
> program (or the program that invoked it) that tried to reboot
> the system, in which case the program that invokes the other one
> should be prepared to handle that exit code - it should check for
> that exit code and say "oh, yeah, well, we don't know how far
> things went, but apparently it doesn't really matter right now,
> we cannot do anything more since the system is shutting down".
> 
> G'luck,
> Peter
> 


Hi Peter,

Thank you!

I see that now.  They start their backup program,
which my program is part of, then shut their
computer down.

I have had to tell folks that if they want things
done after hours, they have to leave their computers
on.  I am good at what I do, but I can not remotely
power on their computers.   (I have never seen wake
on Lan work correctly.)

-T