main-afb-daemon: Set AFB_ROOTDIR and AFB_WORKDIR in environment 83/16383/2
authorJose Bollo <jose.bollo@iot.bzh>
Mon, 27 Aug 2018 16:25:30 +0000 (18:25 +0200)
committerJosé Bollo <jose.bollo@iot.bzh>
Tue, 28 Aug 2018 14:34:05 +0000 (16:34 +0200)
It may be difficult to retrieve the root directory from bindings
and from process spawn by option --exec.

In the same way, well identifying the workdir might interest
programs or bindings.

So, from now, the environment variables below are set:

 - AFB_ROOTDIR: identify the rootdir as set by --rootdir
   and in the context of AGL it will be the widget directory

 - AFB_WORKDIR: identify the workdir as set by --workdir

To avoid any confusion, the function realpath is used to export
absolute path names.

Bug-AGL: SPEC-1694

Change-Id: Id272e009ca975e28aaab8b14fa2a98fbd2216e73
Signed-off-by: Jose Bollo <jose.bollo@iot.bzh>
Signed-off-by: José Bollo <jose.bollo@iot.bzh>

No differences found