Skip to content

Perl CPAN Support, Frozen cpanm Command, Broken I/O Handling In execmd() #1522

@wbraswell

Description

@wbraswell

@liger1978
Discussion of this issue started here: #1519

Specifically, these two comments:
#1519 (comment)
#1519 (comment)

Essentially, this issue causes 2 different negative situations.

First, we can not see any of the output of the cpanm commands, including the critically important configure & build processes such as Makefile.PL and Build.PL and make and gcc and as etc etc. If I don't know what is happening with cpanm then I really have no idea what is happening at all.

Second, we experience an actual freeze/hang during one of the gcc and/or as commands, as shown in the comments linked above.

I have tracked this problem to one line:
https://github.com/wbraswell/fpm/blob/master/lib/fpm/util.rb#L165

if block_given?

If I simply replace this line with if false then both parts of this issue appear to be solved! I can now see all the output generated in real time, and the mysterious hanging gcc/as processes no longer hang! Unfortunately, by doing so I also re-introduce the previous bug 1519, because we need an empty STDIN to be present for any possible interactive processes:
#1519

So, in order to achieve a hybrid solution I actually have to disable all the STDOUT and STDERR parts, while leaving the STDIN parts in tact. I have done this in my latest commit:
wbraswell@3171ee9

Since I am not familiar with the execmd() subroutine and how Ruby handles all the I/O magic, I will not presume that my temporary solution is correct enough to create a pull request. In fact, I assume this would be a not-entirely-correct solution, and that we need to somehow figure out why the hanging is actually happening in order to create a permanent solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions