The script starts download some app, then installs them.
I would like to read output in real time (non blocking mode) and show these logs into the frontend.
I know the only way I can do that is to use child process. But, at the end of the script, this one ask for admin privileges.
Without spawn a child, I can switch the privilege ( I can see the box which asks admin privilege), but I cannot display output in real time.
With a child, can see the output in real time, but cannot use the script, I cannot see the admin requirements.
So how to display logs in non blocking mode into main process, without spawing a child ,
Hi, I think to get an answer you need to break the problem down and be more specific. From reading your question I can't even make out what OS you are having problems with. Is the dialog box the windows "Do you want to let this program make changes to your computer"? Is it a dialog created by the install script that asks root permissions on linux using sudo?
I would say start by making it work on one OS first. If you run into issues, be precise about what is going on.
There's many ways to skin a cat. Which one is appropriate here I cannot tell from the info you gave. One thing you could do if you know that the install script always needs administrator privileges, is to first elevate in the launcher, deal with user permission/dialogs and then invoke the install script directly with admin privs.
I haven't written windows or mac software lately, so I don't know much about the apis, but on linux you're generally supposed to use polkit if you need admin privileges. That's more for installed software and not so much for installers though. But if this is some kind of package manager that stays installed and will repeatedly install software, polkit might be the appropriate technology.
Try to give clear steps of what you are trying to achieve, how and where it fails.