mirror of
https://review.haiku-os.org/haiku
synced 2025-02-11 16:19:28 +01:00
* Since the app_server launched the input_server, it would also get notified when the latter died via a signal - but LinkReceiver could return B_INTERRUPTED in that case (it didn't check the return value of port_buffer_size()) which the app_server misinterpreted and quit itself... this fixes the hanging part of bug #1298. * But the input_server still wasn't restarted, because the Registrar had it still listed as being running. Now, the Registrar checks not just periodically for died teams, it will also check for it when a new application registers itself. This fixes the rest of bug #1298. * Removed the old (disabled) R5 style input_server launch mechanism from the app_server. * MessageLooper now prints a bit more information when a port is supposed to have been deleted. * The default implementation of MessageLooper::_GetLooperName() is now returning the name of the semaphore of its BLocker instead of "unnamed looper". git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22115 a95241bf-73f2-0310-859d-f6bbb57e9c96
66 lines
1.1 KiB
C++
66 lines
1.1 KiB
C++
/*
|
|
* Copyright 2001-2007, Ingo Weinhold, bonefish@users.sf.net.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
|
|
//! An extended app_info.
|
|
|
|
#include "RosterAppInfo.h"
|
|
|
|
#include <new>
|
|
#include <string.h>
|
|
|
|
|
|
using std::nothrow;
|
|
|
|
|
|
// constructor
|
|
RosterAppInfo::RosterAppInfo()
|
|
: app_info(),
|
|
state(APP_STATE_UNREGISTERED),
|
|
token(0),
|
|
registration_time(0)
|
|
{
|
|
}
|
|
|
|
|
|
// Init
|
|
void
|
|
RosterAppInfo::Init(thread_id thread, team_id team, port_id port, uint32 flags,
|
|
const entry_ref *ref, const char *signature)
|
|
{
|
|
this->thread = thread;
|
|
this->team = team;
|
|
this->port = port;
|
|
this->flags = flags;
|
|
this->ref = *ref;
|
|
if (signature)
|
|
strlcpy(this->signature, signature, B_MIME_TYPE_LENGTH);
|
|
else
|
|
this->signature[0] = '\0';
|
|
}
|
|
|
|
|
|
// Clone
|
|
RosterAppInfo *
|
|
RosterAppInfo::Clone() const
|
|
{
|
|
RosterAppInfo *clone = new(nothrow) RosterAppInfo;
|
|
if (!clone)
|
|
return NULL;
|
|
|
|
clone->Init(thread, team, port, flags, &ref, signature);
|
|
clone->registration_time = registration_time;
|
|
return clone;
|
|
}
|
|
|
|
|
|
// IsRunning
|
|
bool
|
|
RosterAppInfo::IsRunning() const
|
|
{
|
|
team_info teamInfo;
|
|
return get_team_info(team, &teamInfo) == B_OK;
|
|
}
|
|
|