Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am runing a list of processes (process1, process2, process3,...) by User1, and i am trying to stop and start these processes by User2 after my task is completed.
The issue is User2 can not start all processes. some of them are started and others are still stopped.
Please if you have any idea about the issue, please feel free to comment.
I am runing a list of processes (process1, process2, process3,...) by User1, and i am trying to stop and start these processes by User2 after my task is completed. The issue is User2 can not start all processes. some of them are started and others are still stopped. Please if you have any idea about the issue, please feel free to comment.
Hard to say, since your question is fairly vague. You don't tell us version/distro of Linux, or really even explain what you're trying to do...hard to understand your question. Can you show us the script/program you've written so far, and tell us where you're stuck, and what your goals are???
Thanks For your replay and sorry for the confusion, i am currently not quite writing any script..... its just as simple as : one user is starting a process other is stoping it and restarting it :
I will give an example using Gedit . ...
Linux distri : Red Hat Enterprise Linux Server release 5.11
Scenario :
let's say i am trying to start gedit 5 times throuht user1, and i need to stop those 5 gedit programs by User2, finish a task (clean up some temp files for exemple) and then restart those 5 gedit instances by User2.... so everythng looks like the same before USer2 started his work...
the issue is : when User2 start those 5 gedit instances, only couple of them are started.....
Thanks For your replay and sorry for the confusion, i am currently not quite writing any script..... its just as simple as : one user is starting a process other is stoping it and restarting it :
I will give an example using Gedit . ...
Linux distri : Red Hat Enterprise Linux Server release 5.11
Scenario : let's say i am trying to start gedit 5 times throuht user1, and i need to stop those 5 gedit programs by User2, finish a task (clean up some temp files for exemple) and then restart those 5 gedit instances by User2.... so everythng looks like the same before USer2 started his work...the issue is : when User2 start those 5 gedit instances, only couple of them are started.....
..and this sounds suspiciously like a homework question, or you're trying to do something shady. What's your goal in trying to do this?
I like your replay
unfortunately, this is not waht you think homework .... i literally want to do what i explained earlier there is no fishy thing ...
i have 2 users : one is for application usage and other one is for maintenance usage.
1 - Processes srtart by application user.
2 -Manitenance user need to stop current processes.
3 -do maintenance.
4 - re-start the processes.
the issue is when maintenance process try to start those processes some of them are started and some stay stopped..
This is very simple case .....Thanks again
Last edited by gentlesome; 12-01-2016 at 04:39 PM.
thanks for your replay :
I like your replay unfortunately, this is not waht you think homework .... i literally want to do what i explained earlier there is no fishy thing ...
i have 2 users : one is for application usage and other one is for maintenance usage.
1 - Processes srtart by application user.
2 -Manitenance user need to stop current processes.
3 -do maintenance.
4 - re-start the processes.
the issue is when maintenance process try to start those processes some of them are started and some stay stopped..
So then why the request to have "everything look the same", so that user2 doesn't know what happened?
Quote:
This is very simple case
So if it's so simple, why haven't you done it?
Have you looked into the "kill" command? Specifically, the -STOP (or -TSTP) and -CONT parameters?? You can stop/pause an application, do whatever you'd like, then CONTINUE from where you left off.
So then why the request to have "everything look the same", so that user2 doesn't know what happened?
So if it's so simple, why haven't you done it?
Have you looked into the "kill" command? Specifically, the -STOP (or -TSTP) and -CONT parameters?? You can stop/pause an application, do whatever you'd like, then CONTINUE from where you left off.
Hi This replay sounds little rude to me
So if it's so simple, why haven't you done it?
..... I am saying the case is simple to understand .... and from your answer is see that you still did not get my point when you are talking about "kill" my issue is not stopping the proceses ... my issues is about restarting a process back under different user... and i gave an exemple with Gedit ...
If you are not willing to answer .. please let someone else maybe can be more open to help other than being arrogant ..
And one more time thank you for the help you provided .
Thanks
Last edited by gentlesome; 12-02-2016 at 02:53 PM.
Hi This replay sounds little rude to me So if it's so simple, why haven't you done it?
..... I am saying the case is simple to understand .... and from your answer is see that you still did not get my point when you are talking about "kill" my issue is not stopping the proceses ... my issues is about restarting a process back under different user... and i gave an exemple with Gedit ...
If you are not willing to answer .. please let someone else maybe can be more open to help other than being arrogant ..
Anyone can post anything they'd like to you...I certainly can't stop them. And I get your point very well.
What I DO NOT see is evidence of your own work. You claim this isn't homework, and say this isn't for anything shady, and claim to already have it partially working. Great...so post what you've already done. Based on your REPLY (the word is not 'replay'), it seems like you're looking for something VERY specific, since both the -STOP and -TSTP flags work fine for such things.
Again, read the "Question Guideline" link in my posting signature. You have not shown your own work, actually given details about what you're trying to accomplish (and just re-stating your question doesn't provide more details), told us what version/distro of Linux, etc.
Anyone can post anything they'd like to you...I certainly can't stop them. And I get your point very well.
What I DO NOT see is evidence of your own work. You claim this isn't homework, and say this isn't for anything shady, and claim to already have it partially working. Great...so post what you've already done. Based on your REPLY (the word is not 'replay'), it seems like you're looking for something VERY specific, since both the -STOP and -TSTP flags work fine for such things.
Again, read the "Question Guideline" link in my posting signature. You have not shown your own work, actually given details about what you're trying to accomplish (and just re-stating your question doesn't provide more details), told us what version/distro of Linux, etc.
First of all if tooke a second , you sould have found that i already gave Linux distribution , and also being to rude to someone who (let's say made a mistake) won't help anyone .... giving guidance does not mean being rude to anyone...
and one more thing, sorry, i did not know that i have to prodive what i did as qa proof or just to say " i did not ask you to do it for me" ...... about focusing on my orthography rather than the purpose of the post itself is very clear as Eleanor Roosevelt said :
Great minds discuss ideas; average minds discuss events; small minds discuss people.
And one more thing if you don't like a post just don't replay your rudeness .... and yes i mean replay not replcya because you are posting your rudeness over and over again.....
And thanks again for your time
and if you don't like it don't simply put anything just ignore , you have no right to school anyone
First of all if tooke a second , you sould have found that i already gave Linux distribution ,
RHEL 5.11 is a commercial, PAY FOR distro...are you paying for it? And in your post, you said "by example".
Quote:
and also being to rude to someone who (let's say made a mistake) won't help anyone .... giving guidance does not mean being rude to anyone...
and one more thing, sorry, i did not know that i have to prodive what i did as qa proof or just to say " i did not ask you to do it for me" ...... about focusing on my orthography rather than the purpose of the post itself is very clear as Eleanor Roosevelt said :
Great minds discuss ideas; average minds discuss events; small minds discuss people.
And what did she say about the size of the mind who ignores the forum rules, doesn't read the posting guidelines, and won't answer questions directly when asked??? Since the very first reply, we've been trying to get details out of you about what you're trying to accomplish, yet you won't provide them. If you won't, there is no point in just re-stating your question. You've been given something that works perfectly well, but have chosen to ignore it, for reasons you won't share.
You claim it's not homework, and say it's for 'work', but trying to do something that avoids user detection sounds very suspicious. Since you won't clarify, what do you think we can tell you?
Quote:
And one more thing if you don't like a post just don't replay your rudeness .... and yes i mean replay not replcya because you are posting your rudeness over and over again.....
And how rude is it to plain not answer questions?
Quote:
And thanks again for your time and if you don't like it don't simply put anything just ignore , you have no right to school anyone
Anyone can post what they like....you are wrong in your use of words, and if you want to sound like an idiot after knowing better, that's your choice.
>[maint intervention on app problem, but (I wonder WHY) change user? "re-start" from beginning or CONTinue?]
I think only root (UID 0) can 'control' (and change EUID of) a process of different UID.
MAYBE: as root, use gdb to attach the pid; call seteuid(<uid2>)
Let us know specifics (e.g. `ps` &above 2?s)... Best wishes.
p.s. I'd suggest, before proceeding further, spend a few minutes on Google of:
process change state|uid
RHEL 5.11 is a commercial, PAY FOR distro...are you paying for it? And in your post, you said "by example".
And what did she say about the size of the mind who ignores the forum rules, doesn't read the posting guidelines, and won't answer questions directly when asked??? Since the very first reply, we've been trying to get details out of you about what you're trying to accomplish, yet you won't provide them. If you won't, there is no point in just re-stating your question. You've been given something that works perfectly well, but have chosen to ignore it, for reasons you won't share.
You claim it's not homework, and say it's for 'work', but trying to do something that avoids user detection sounds very suspicious. Since you won't clarify, what do you think we can tell you?
And how rude is it to plain not answer questions?
Anyone can post what they like....you are wrong in your use of words, and if you want to sound like an idiot after knowing better, that's your choice.
Now beying described as an idiot ... you only apply rules you like and bypass rules you don't like ...
telling me i am wrong in using a word, i think you don't have the power to open my mind or to judge me ..... as long i think all people can testify i was respectful since the beginning ..... Please if you don't like the post and you judge is as against any rules in this forum ... and as you have the admin power just delete it and stop being rude to people ....
One more time telling be look like an idiot is not acceptable and you have no right to say that to me ...
>[maint intervention on app problem, but (I wonder WHY) change user? "re-start" from beginning or CONTinue?]
I think only root (UID 0) can 'control' (and change EUID of) a process of different UID.
MAYBE: as root, use gdb to attach the pid; call seteuid(<uid2>)
Let us know specifics (e.g. `ps` &above 2?s)... Best wishes.
p.s. I'd suggest, before proceeding further, spend a few minutes on Google of:
process change state|uid
Thank you so much for your help and very interesting information
Now beying described as an idiot ... you only apply rules you like and bypass rules you don't like ...
telling me i am wrong in using a word, i think you don't have the power to open my mind or to judge me ..... as long i think all people can testify i was respectful since the beginning ..... Please if you don't like the post and you judge is as against any rules in this forum ... and as you have the admin power just delete it and stop being rude to people ....
One more time telling be look like an idiot is not acceptable and you have no right to say that to me ...
Sorry, but again, if you intentionally use wrong words/language after you've been told better, you WILL look like an idiot. No clue what you mean by "you don't have the power to open my mind or judge me"...you were told your use of language was wrong, and did it INTENTIONALLY. Doing something wrong when you know better doesn't exactly make someone look smart.
You've been asked multiple times, by two persons (myself and Jjanel), to give us details about what you're actually trying to do, why the solutions given to you won't work, etc., but you will not. You began being rude after first being asked for details, and have escalated more each time. You STILL don't answer questions, and there is no point in posting anything to you, since if you can't (or won't) answer questions/provide details, or even be POLITE, you sure won't get any help from anyone, anywhere.
Sorry, but again, if you intentionally use wrong words/language after you've been told better, you WILL look like an idiot. No clue what you mean by "you don't have the power to open my mind or judge me"...you were told your use of language was wrong, and did it INTENTIONALLY. Doing something wrong when you know better doesn't exactly make someone look smart.
You've been asked multiple times, by two persons (myself and Jjanel), to give us details about what you're actually trying to do, why the solutions given to you won't work, etc., but you will not. You began being rude after first being asked for details, and have escalated more each time. You STILL don't answer questions, and there is no point in posting anything to you, since if you can't (or won't) answer questions/provide details, or even be POLITE, you sure won't get any help from anyone, anywhere.
I am still polite .... who is not polite here ... the person who is giving orders to people trying to school people .. or a person who is still being thankful to people using a wrong language is not at all related to you and you have no right to jugde ....
If you like it you answer you don't like it just leave it ......
and oine more time :
you requested the distribution , i already provided it to you .... my solution did not work for me because noit all processes are re-started ..... And please point me to the reason this make any difference if it's for work for school for fun for self-education ....
I am so sorry that i had to ask aperson like you for help ... sure i don't have the knowledge that you have in this field .. yes it's my fault i gave the opportunity to person like you to be haughty .....
Thanks
Last edited by gentlesome; 12-05-2016 at 02:41 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.