Re: [LAD] Summercode 2008: LASH as a D-Bus service

From: Bob Ham <rah@email-addr-hidden>
Date: Wed Jan 23 2008 - 00:34:17 EET

On Tue, 2008-01-22 at 21:21 +0200, Juuso Alasuutari wrote:
> On Tuesday 22 January 2008 21:10:55 Bob Ham wrote:
> > On Tue, 2008-01-22 at 20:58 +0200, Nedko Arnaudov wrote:
> > > Bob Ham <rah@email-addr-hidden> writes:
> <snip>
> > > > Applications are already launched from a wrapper within lashd (what it
> > > > terms the "loader".) It calls fork() and exec(). The only thing that
> > > > needs to be done is to change stdout and stderr to point to a log file
> > > > after calling fork() and before calling exec(). The appropriate place
> > > > for the file would be the application's directory under the project
> > > > directory.
> > >
> > > Not just that, I want to know what app outputed what. If their out goes
> > > to common log file, we need prefixing.
> >
> > Each connected LASH client has its own directory under the main LASH
> > project directory. By redirecting each client's output to a file in its
> > client-specific directory, there would be no common log file.
>
> There's always the distant possibility that the log file's name matches the
> client's data file's name, and if they're in the same directory things break.
> What about "$project_root/$unique_client_id.log" instead of the client's
> directory?

This is already an issue; there is a ".config" directory that stores the
client's config data. Probably the best solution is to push the
client's data into a further subdirectory. You would then have a
structure like this:

  $client_dir/
  $client_dir/client-files/saved-file.xml
  $client_dir/client-files/saved-file-2.xml
  $client_dir/config-data/foo
  $client_dir/config-data/bar
  $client_dir/log.txt

rather than

  $client_dir/
  $client_dir/saved-file.xml
  $client_dir/saved-file-2.xml
  $client_dir/.config/foo
  $client_dir/.config/bar
  $client_dir/.log.txt

Bob

-- 
Bob Ham <rah@email-addr-hidden>

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev

Received on Wed Jan 23 04:15:26 2008

This archive was generated by hypermail 2.1.8 : Wed Jan 23 2008 - 04:15:26 EET