aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: [1] 2 3

Author Topic: Auto startup of amuleweb should kill it at shutdown  (Read 11888 times)

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Online Online
  • Posts: 1549
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Auto startup of amuleweb should kill it at shutdown
« on: July 21, 2005, 02:36:46 PM »

Hi,
while playing around with amule and the posibillity to startup amuleweb automatically I saw, that amuleweb isn't shutdown when I close amule. Maybe it's because I had to kill amule, but after 5 tries I have 5 amuleweb processes. One for each try.
I would suggest, that either amule kills amuleweb at shutdown (or kill) or that amule checks if amuleweb is already running, and then don't start another instance.
Logged
Homefucking is killing prostitution

lfroen

  • Guest
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #1 on: July 21, 2005, 02:56:38 PM »

That was an original idea, but implementation seems buggy ...
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #2 on: July 21, 2005, 04:14:47 PM »

Code: [Select]
// Kill amuleweb if running
if (webserver_pid) {
printf("Killing amuleweb instance...\n");
wxKillError rc;
wxKill(webserver_pid,wxSIGKILL, &rc);
printf("Killed!\n");
}

Maybe if you don't kill it... :P
Logged

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Online Online
  • Posts: 1549
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #3 on: July 21, 2005, 06:54:40 PM »

I don't want to, but sometimes it is needed. I wanted to test how many downloads it can handle, and with atm 649 on an remote fs appear some errors. Sometimes I just have to, so it would be nice, if amule would check if amuleweb is already running.
Logged
Homefucking is killing prostitution

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #4 on: July 21, 2005, 08:28:49 PM »

And do what if it's running?
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #5 on: July 21, 2005, 08:45:16 PM »

Quote
Code: [Select]
wxKill(webserver_pid,wxSIGKILL, &rc);
Why killing? Why not just terminating it? Doesn't wx have a wxSIGTERM?
Logged
concordia cum veritate

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Online Online
  • Posts: 1549
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #6 on: July 21, 2005, 09:14:48 PM »

Quote
Originally posted by Kry
And do what if it's running?

Nothing. When I killed the new ones, I can use the old one.
Logged
Homefucking is killing prostitution

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #7 on: July 22, 2005, 03:12:52 PM »

Nonsense. amuleweb connects to a running aMule, and DOESN'T reconnect to it if it's lost. So you can't use the old one with a newly running aMule.
Logged

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Online Online
  • Posts: 1549
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #8 on: July 22, 2005, 04:00:13 PM »

Maybe I killed the false one, but it should be no problem to reconnect. Or at the other side, you could let amuleweb die when it loses connection.
« Last Edit: July 22, 2005, 04:16:39 PM by Vollstrecker »
Logged
Homefucking is killing prostitution

ken

  • Hero Member
  • *****
  • Karma: 4
  • Offline Offline
  • Posts: 825
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #9 on: July 22, 2005, 11:30:20 PM »

Well, certainly, it should quit if it loses the connection and it has no stdin.
Logged

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Online Online
  • Posts: 1549
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #10 on: July 23, 2005, 12:42:23 AM »

werner@Werner1:~$ ps -A | grep amule
12480 ?        00:00:00 amuleweb
werner@Werner1:~$
Logged
Homefucking is killing prostitution

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #11 on: July 23, 2005, 02:37:42 AM »

Yeah, that did make a lot of sense.

Now, if you could explain what you pretend to achieve by that lines...
Logged

Vollstrecker

  • Administrator
  • Hero Member
  • *****
  • Karma: 67
  • Online Online
  • Posts: 1549
  • Unofficial Debian Packager
    • http://vollstreckernet.de
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #12 on: July 23, 2005, 03:29:59 PM »

Quote
Originally posted by ken
Well, certainly, it should quit if it loses the connection and it has no stdin.

Quote
Originally posted by Vollstrecker
werner@Werner1:~$ ps -A | grep amule
12480 ? 00:00:00 amuleweb
werner@Werner1:~$
Quote
Originally posted by kry
Now, if you could explain what you pretend to achieve by that lines...


Got it now?
There is no amule or amuled process running, so it has lost connection. I closed the console where I started amule, so it has no stdin, stdout or stderr. But it does run.
Or was that wath ken posted not the behaviour? If that was a suggestion, I would be glad to see that implemented.
Logged
Homefucking is killing prostitution

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #13 on: July 24, 2005, 02:30:27 AM »

It was a sugestion.
Logged

lfroen

  • Guest
Re: Auto startup of amuleweb should kill it at shutdown
« Reply #14 on: July 24, 2005, 08:18:07 AM »

Exit when connection is failed is wrong.
Instead, on every request from browser amuleweb must perform one more connection attempt. If succeded, return to normal operation; if not - display error page telling the nature of the problem, like "connection failed/timeout/no route to host/ etc".
Logged
Pages: [1] 2 3