[Bug c++/85226] New: system() gives pid 0 and doesn't launch the command

2018-04-05 Thread f-rog at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85226

Bug ID: 85226
   Summary: system() gives pid 0 and doesn't launch the command
   Product: gcc
   Version: 7.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: f-rog at hotmail dot com
  Target Milestone: ---

Created attachment 43852
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43852&action=edit
Replace the naga.cpp in sry folder before install to test

I have this github project :
https://github.com/lostallmymoney/Razer_Key_Mapper_Linux .
To replicate this bug you can install and launch it by running sh install.sh ,
next open a terminal and run naga -restart .
Restarting the daemon causes a bug with system('command') wich makes it not
launch the command and gives the PID 0. You can test the code with this file so
it tries to use system right after -restart. Here's the edited file :

[Bug c++/85226] system() gives pid 0 and doesn't launch the command

2018-04-05 Thread f-rog at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85226

f-rog at hotmail dot com changed:

   What|Removed |Added

  Attachment #43852|0   |1
is obsolete||

--- Comment #1 from f-rog at hotmail dot com ---
Created attachment 43853
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43853&action=edit
Replace the naga.cpp in src folder before install to test

[Bug c++/85226] system() gives pid 0 and doesn't launch the command

2018-04-05 Thread f-rog at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85226

f-rog at hotmail dot com changed:

   What|Removed |Added

  Attachment #43853|0   |1
is obsolete||

--- Comment #2 from f-rog at hotmail dot com ---
Created attachment 43854
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43854&action=edit
Replace the naga.cpp in src folder before install to test

[Bug c++/85226] system() gives pid 0 and doesn't launch the command

2018-04-05 Thread f-rog at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85226

f-rog at hotmail dot com changed:

   What|Removed |Added

  Attachment #43854|0   |1
is obsolete||

--- Comment #3 from f-rog at hotmail dot com ---
Created attachment 43855
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43855&action=edit
Empty

[Bug c++/85226] system() gives pid 0 and doesn't launch the command

2018-04-05 Thread f-rog at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85226

--- Comment #4 from f-rog at hotmail dot com ---
Please don't try to solve it as I try to fix it. It might not be g++ fault
after all.

[Bug c++/85226] system() gives pid 0 and doesn't launch the command

2018-04-05 Thread f-rog at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85226

--- Comment #6 from f-rog at hotmail dot com ---
Well my bad it's a bug that made it so i needed to wait at least around 20 ms
before restarting the daemon. It's weird tho because i could press the button
and get the log : Command executed : command and yet i'd need to wait like 1
second with the key pressed for it to actually do anything. If I released it
was like it had never ran the actual thing. I still think somehow it's a
system() related bug but I patched it.