ThePrez / ServiceCommander-IBMi

Service Commander for IBM i
Apache License 2.0
42 stars 12 forks source link

[Q] Should "batch mode" for STRTCPSVR be based on interactiveness? #115

Closed ThePrez closed 2 years ago

ThePrez commented 2 years ago

See #109 for background. (the below text copied from this comment)

I think the solution still has room for improvement. The intent of this check:

is_batch = (pd->pw_name[0] == 'Q');

... Is to allow for the sc output to be shown to the user when running interactive, but for it to go "batch mode" when run in the IPL or other "headless" environments.

Brainstorming, do you think it'd be worth checking if we're in a "headless" (non-5250-interactive) mode by calling one of:

Adding @chrjorgensen to follow the discussion here

chrjorgensen commented 2 years ago

Jesse, I couldn't figure out the reasoning behind the difference between Q-profiles and non-Q-profiles, but your explanation above makes sense.

I think testing for batch mode is the right solution. This gives the user the option to have the output presented by running it interactively - and if any lock was caused by another job running the same STRTCPSVR command, it would be more obvious to the user. Most locks would probably be quite short in this situation anyway, since the system is fully up and not CPU constraint like during or right after IPL - which was my situation.

ThePrez commented 2 years ago

Those are really great points. Thank you! Since I landed #116 with your blessing, I'll close this one out (feel free to request a reopen if there's still a missing piece)