Perl system() 不在纳米服务器中等待

Perl system() does not wait in nano server

我正在尝试 运行 基于 Windows 2016 Nano Server 的 docker 容器中的 Perl 脚本。为此,我正在使用 ActivePerl 5.24。

现在我 运行 遇到一个有趣的问题,即 system() 调用在我的 2016 Server 主机和 2016 Nano Server 容器中的行为不同。

#!/usr/bin/perl

use strict;
use warnings;

my $status = system('perl.exe -c test.plx');
print "Return: " . $status . "\n";
print "Exit: " . ($status >> 8) . "\n";
print "Signal: " . ($status & 127) . "\n";
print "Message: $!\n";

在主机 Windows 2016 服务器上它按预期工作:

c:\>perl test.plx
test.plx syntax OK
Return: 0
Exit: 0
Signal: 0
Message:

在我的 Docker 容器中的 Nano 服务器上,它看起来像这样:

C:\>perl test.plx
Return: 768
Exit: 3
Signal: 0
Message:

如您所见,输出丢失并且 return 代码不是 0。

如果我现在按return..

C:\>
C:\>test.plx syntax OK

所以看起来 system() 没有等待并且 returns 768(不管那是什么意思)

我也尝试过使用 "ping -v" 而不是 "perl -c" 但同样的事情发生了,所以它一定是与 system() 实现相关联的东西。

有谁知道为什么同一个调用在 docker 容器中的行为完全不同以及我可以做些什么来让 system() 等待?

更新: 当我使用 microsoft/windowsservercore 作为基本图像时,我确认它有效。所以这里发生的任何事情似乎都是 Nano Server 特有的。

我收到了 ActiveState 支持部门关于此问题的回复。

The standard ActiveState builds are not supported on Nano servers. There are too many missing components with Nano. If you were interested in pursuing a custom build I could connect you with our sales team, and they could describe our Enterprise tier offering.

因此,如果我想坚持使用 Nano 服务器,我要么必须等到有人决定将其实施到标准构建中,要么我需要切换到不同的 Perl 发行版。

在那之前,我将使用有效的 Server Core。