Ask Your Question


asked 2016-04-29 00:37:15 -0500

oddestNeeds gravatar image

Well. My application calls posix_spawn to: launch a bash file which in turn: calls make & compiles my program.

The code has been working for years.

Now it doesn't. ( Fedora 24 latest updates )

It hangs on the wait. The forked process does not end. All the forked process does is launch a background process and exit immediately.

int waitPIDerr= waitpid( pid, NULL, 0 /* WNOHANG */ );

I'm thinking to simply wait on a loop then kill the pid. Which will work. But isn't right.

Any ideas as to why this code that has been working 100% reliable for years no longer works are welcome. To be fair. I use Linux. I'm no way any sort of expert on its many complexities.

However. This would appear to be an issue with OS upgrades.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-05-14 02:34:26 -0500

oddestNeeds gravatar image

Life is a mystery to me.

Since the process exits immediately,

I bypassed the waitpid && just killed the new pid.

edit flag offensive delete link more


To get things to work for Fedora 24, I HAD TO BACK OUT THE CHANGE.

Using Fedora 24, the original code works as expected.

oddestNeeds gravatar imageoddestNeeds ( 2016-05-27 19:36:26 -0500 )edit

Question Tools

1 follower


Asked: 2016-04-29 00:37:15 -0500

Seen: 273 times

Last updated: May 14 '16